パッケージの詳細

node-icu

Node icu package

icu, icu4c

readme

Node ICU

Downloads the correct icu .dat file for your cpu-architecture and node version.

Installation

# npm
npm install node-icu

# yarn
yarn add node-icu

To use the icu data, start node with the --icu-data-dir option or set the NODE_ICU_DATA environment variable.

Example:

node --icu-data-dir=node_modules/node-icu myapp.js

To test if everything is working, run this:

// should return "enero" instead of "January"
new Intl.DateTimeFormat('es',{month:'long'}).format(new Date(9E8));

License

MIT see License.

更新履歴

Changelog

1.1.0

  • use endianness provided by node's os module instead of hardcoding LE

1.0.1

  • Initial release