Journalize Versions Save

:newspaper: A collection of JavaScript functions useful for making prose reader friendly.

2.6.0

1 year ago

Added

  • Adds two new date methods — apmonthtab and apdatetab. These two are identical to apmonth and apdate except months are output in AP's tabular format instead. Instead of Sept. you get Sep, etc.
  • The logic for determining the correct suffix in ordinal has been extracted and made into its own method called ordinalsuffix. This makes it possible to access the correct suffix for a number without modifying the original value. Great for if you'd like to style the number and suffix differently, or just want to output them separately. Credit to @sawyerclick for the suggestion in #283!

2.5.1

3 years ago

Fixed

  • Due to how Node module resolution works with ECMAScript modules, the module and exports.import files must have .mjs extensions.

2.5.0

3 years ago

Added

  • Add export map to package.json.

2.4.0

3 years ago

Added

  • intword now supports negative integers.
  • intcomma now has tests confirming it does support negative numbers, but no changes were made to the code.

Changed

  • Bumped LICENSE to 2020.

2.3.0

4 years ago

Added

  • ordinal now accepts a second boolean parameter (that defaults to false) that outputs 1 through 9 as spelled out (first, third, seventh, etc.) instead of as numeral ordinals, per AP style rules.

2.2.1

4 years ago

Fixed

  • Added missing types directory to the package.json files list.

2.2.0

5 years ago

Added

  • Added TypeScript type file.

Fixed

  • Explicitly convert supplied values to strings with toString() in functions that short circuit to guarantee it returns the correct type.

Changed

  • Updated LICENSE year to 2019
  • Updated dependencies
  • General housekeeping of the repo
  • Add Node 11 to test matrix
  • Moved tests to __tests__ directory so we stop shipping them in the npm bundle

2.1.1

5 years ago

Fixed

  • Fixed bug with pluralize where an Array with a single number in it that's not 1 is considered plural due to parseFloat and Number being weird when passed an Array.

2.1.0

5 years ago

Added

  • Added unpkg and jsdelivr fields to package.json
  • Added widont function

Removed

  • Removed umd:main field from package.json

2.0.1

5 years ago

Fixed

  • Fixed bug in aptime where it would return 0 for times at 12 p.m. when there were also minutes (thanks @jmuyskens)