Registry / productivity / normalise-acn

normalise-acn

JSON →
library1.0.0jsnpmunverified

Australian Company Number (ACN) normaliser and formatter. Current stable version 1.0.0, single release to date. Provides functions to validate, normalise (strip spaces/formatting), extract ACN from mixed strings, and format with standard spacing. Lightweight, no dependencies, ESM and CJS compatible, TypeScript type declarations included.

productivity
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package supports both ESM and CommonJS. Use default import for CommonJS if needed.

import { isValidACN } from 'normalise-acn'

Function name uses camelCase, not all lowercase.

import { normaliseACN } from 'normalise-acn'

Case-sensitive export.

import { formatACN } from 'normalise-acn'

Demonstrates validation, normalisation, formatting, and extraction of an Australian Company Number.

import { isValidACN, normaliseACN, formatACN, extractACN } from 'normalise-acn'; // Validate an ACN console.log(isValidACN('123 456 789')); // true or false // Normalise: remove spaces and dashes console.log(normaliseACN('123 456 789')); // '123456789' // Format with standard spacing (XXX XXX XXX) console.log(formatACN('123456789')); // '123 456 789' // Extract ACN from larger string console.log(extractACN('ACN: 123 456 789')); // '123456789'
Debug
Known footguns
gotchaCase sensitivity of function exports: use exact camelCase names (e.g., 'normaliseACN', not 'normaliseAcn').
gotchaInput may contain leading/trailing whitespace or symbols; normaliseACN strips non-digit characters except for internal spaces/dashes that are removed.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
19 hits · last 30 days
gptbot
3
amazonbot
3
ahrefsbot
2
mj12bot
1
bytedance
1
Resources