Skip to content

Package to download the correct icu-data file for nodejs

License

Notifications You must be signed in to change notification settings

marvinhagemeister/node-icu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node ICU

NOTE: This package is not necessary anymore, because full-icu just released an updated version with support for yarn. Please use that one instead.

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.

About

Package to download the correct icu-data file for nodejs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published