The ilib-localedata package (v1.5.4) provides a LocaleData class for loading and caching iLib locale data in Node.js applications. It works with ilib-loader to fetch data from various sources (files, webpack lazy-load modules). The library supports Node.js versions 12 through 22. Key differentiators: decouples data loading from the iLib library itself, allowing custom loaders and caching strategies. Stable release cadence with regular updates.
npm install ilib-localedataNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a LocaleData instance and loads locale info for English (US).
Upgrade to Node.js 12 or later.
Use ESM imports (import) instead of require().
Use async/await or .then() to handle the promise.
Install ilib-loader: npm install ilib-loader
Use import { LocaleData } from 'ilib-localedata' or const LocaleData = (await import('ilib-localedata')).LocaleData