ghiscoding / moment-tiny

arse, validate, manipulate, and display dates in javascript. http://momentjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT npm version

moment-tiny

This package exposes 2 builds from the MomentJS projects (CJS and ESM), both of the files are pulled from the GitHub/Moment project, so that you can import/require your prefered build of moment into your projects without the bloat of any locales.

  • CJS which is /moment.js (not minified) located at GitHub Moment's project root.
  • ESM which is /min/moment.min.js (minified) located in GitHub Moment's project under /min folder
    • some info was detailed in this MomentJS commit.

This package will follow the moment.js releases.

What's the difference with moment-mini?

The difference is that moment-mini is only including the CJS build, however I'm more interested in the ESM build which is also included in here. I also added exports in the package.json for better support as can be seen under the Are the types wrong website.

To be clear, MomentJS already has both CJS/ESM builds (which is actually where we are getting the files from) but bundlers like WebPack will most often include all locales which is a huge problem. Since moment-tiny does not provide any locale, the install will always be the smallest without requiring any bundler config.

About

arse, validate, manipulate, and display dates in javascript. http://momentjs.com

License:MIT License


Languages

Language:JavaScript 100.0%