Skip to content

Releases: mesqueeb/commafy-anything

v4.0.1

19 Feb 18:42

Choose a tag to compare

  • chore: update dependencies 578aa4b

v4.0.0...v4.0.1

v4.0.0

05 Jun 00:57

Choose a tag to compare

  • feat: esm only! node v18+ 🎉 e073c2d

v3.0.4...v4.0.0

v3.0.4

23 May 02:22

Choose a tag to compare

v3.0.3

07 May 07:15

Choose a tag to compare

v3.0.2...v3.0.3

v3.0.2

26 Jan 13:00

Choose a tag to compare

  • chore: update dependencies fb4a96b

v3.0.1...v3.0.2

v3.0.1

26 Jan 12:55

Choose a tag to compare

  • chore: fix npm dependency 5a892f6

v3.0.0...v3.0.1

v3.0.0

25 Jan 09:23

Choose a tag to compare

breaking changes

  • requires node v12+
  • is now an esm package with "type": "module" in package.json

v2.1.1

25 Jan 03:59

Choose a tag to compare

v2.0.0...v2.1.1

Only named exports & thousands comma by default

05 Nov 08:39

Choose a tag to compare

Breaking changes

Now there are only named exports:

// before
import commafy from 'commafy-anything'
// after
import { commafy } from 'commafy-anything'

thousands comma is shown by default.

// before
t.is(commafy(1000), '1000')
t.is(commafy(10000), '10,000')
// now
t.is(commafy(1000), '1,000')
t.is(commafy(10000), '10,000')

updated the options object & better typescript support:

// options as second param:
{ stripDecimals?: boolean, spacedDecimals?: boolean, thousandsComma?: boolean }
// of which defaults are
{ stripDecimals: false, spacedDecimals: false, thousandsComma: true }