mmntjs v1.0.0 is a drop-in replacement for moment.js that provides a migration path to the Temporal API. It implements the full moment.js API surface and allows gradual migration file-by-file without breaking existing code. Ships TypeScript types, supports Node >=16. Key differentiators: zero-code alias using npm alias (`moment@npm:mmntjs`), automated codemod (`npx mmntjs migrate`), coexistence mode with original moment.js, and multiple entry points including `lite` (14.8 KB gzip), `full` (45.1 KB), tree-shakeable `fns` (0.5-1.3 KB), and a `temporal` bridge. Includes 136 locales and optional timezone support via separate package `mmntjs-timezone`. Released with weekly cadence.
npm install mmntjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates alias mode, gradual migration, lite with locale, and Temporal bridge.
Use method chaining or assign results to new variables: `const m2 = m1.add(1, 'day');`
Replace `.zone(value)` with `.utcOffset(value)`.
Test formatting strings with your target locales and report issues upstream.
Manually parse two-digit years before passing to moment.
Use `import m from 'mmntjs'` for moment constructor, and `import { format } from 'mmntjs/fns'` for standalone functions.Use `import moment from 'mmntjs'`
Add `"moduleResolution": "bundler"` or `"node16"` in tsconfig.json.
Use `import moment from 'mmntjs'` with ESM, or `const moment = require('mmntjs')` if CJS (but mmntjs is ESM-only).No dependency data recorded yet.