MfGames Culture for Node
Provides additional Node features and functionality for MfGames Culture.
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install mfgames-culture-node --save
Tests
npm test
License
MIT
Examples
Below is an example of using the library to load from a directory. This assumes that every identifier is saved as a JSON file in the top-level of the directory (e.g., gregorian.js
and en-US.json
).
;;; // Create the provider.var provider = datadataDirectory; // Load a calendar while blocking.var calendarData = provider;var calendar = cultureTemporalTypeinstant calendarData;var instant = calendar; // Load a calendar through a promise.provider ; // Loading a culture while blocking.var cultureData = provider;var culture = cultureData;var instant = culture; // Loading cultures via promises.provider ;