node-moment

2.5.1 • Public • Published

A nodejs packaging - with sane loading API / global fingerprint - of the great & beloved moment.js library (just export "moment")

(use a js bundler/browserify/webpack on you own), why should a library care

API

const moment = require('node-moment');

var nextyear  = moment().add(moment.duration("P1Y"));
console.log("Next year will be", nextyear);


//load languages (if required)
var moment_fr = require('node-moment/lang/fr');
moment_fr(moment);

var nextyear  = moment().add(moment.duration("P1Y"));
console.log("Next year will be", nextyear);


Doc

Find moment.js documentation here.

Credits

Keywords

WTF commonJS, moment, require, module-api-is-broken, just-require, just-require-fuck, just-require-and-use-module-export-fuck

Package Sidebar

Install

npm i node-moment

Homepage

momentjs.com

Weekly Downloads

19

Version

2.5.1

License

MIT

Last publish

Collaborators

  • 131