npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stackline/moment-core

v1.0.0

Published

Maintained Moment.js API package for parsing, validating, manipulating, and formatting dates.

Readme

@stackline/moment-core

A maintained Moment.js API package for parsing, validating, manipulating, and formatting dates with support for strict parsing, locale bundles, UTC workflows, durations, browser-ready minified assets, and TypeScript declarations.

npm version npm downloads npm monthly license JavaScript ES5+ TypeScript typings GitHub stars

Documentation & Live Demos | npm | GitHub Download | Issues | Repository

Latest version: 1.0.0


Credits: Original project by Iskren Ivov Chernev and the Moment.js contributors.
Maintained and republished by Alexandroit under the Stackline scope.


Why this library?

@stackline/moment-core keeps the stable Moment.js API available under active package ownership for teams that still depend on its parsing, formatting, locale, duration, and relative-time behavior. The package stays intentionally close to the classic Moment.js API, while cleaning up metadata and preserving browser-ready bundles, locale files, and TypeScript declarations.

Features

| Feature | Supported | | :--- | :---: | | Stackline 1.0.0 release baseline on the Moment.js API | ✅ | | Parse common date inputs and custom formats | ✅ | | Strict parsing and validation diagnostics | ✅ | | Localized formatting and calendar output | ✅ | | Relative time and duration helpers | ✅ | | UTC and offset-aware workflows | ✅ | | 130+ locale bundles | ✅ | | TypeScript declaration files | ✅ | | Browser-ready minified bundles | ✅ | | Versioned docs per published package release | ✅ |

Table of Contents

  1. Published Version Compatibility
  2. Installation
  3. Direct Download
  4. Setup
  5. Basic Usage
  6. Core APIs
  7. Browser Assets
  8. Run Locally
  9. Publishing
  10. License

Published Version Compatibility

| Package version | Upstream base | Runtime target | TypeScript declarations | Demo link | | :---: | :---: | :--- | :--- | :--- | | 1.0.0 | Moment API baseline | ES5+ browsers and Node.js | moment.d.ts + ts3.1-typings/ | Moment 1.0.0 docs |


Installation

npm install @stackline/moment-core

Direct Download

If your project loads JavaScript directly in the browser, download the prebuilt release from GitHub:

The archive includes moment.min.js, moment-with-locales.min.js, and locales.min.js.

<script src="./moment.min.js"></script>
<script>
  const value = moment('2026-04-03 14:30', 'YYYY-MM-DD HH:mm', true);
  console.log(value.isValid(), value.format('LLLL'));
</script>
<script src="./moment-with-locales.min.js"></script>
<script>
  moment.locale('fr');
  console.log(moment().format('LLLL'));
</script>

Setup

import moment from '@stackline/moment-core';
import '@stackline/moment-core/locale/fr';

moment.locale('fr');

Basic Usage

import moment from '@stackline/moment-core';

const parsed = moment('2026-04-03 14:30', 'YYYY-MM-DD HH:mm', true);

const isoOutput = parsed.clone().utc().format('YYYY-MM-DDTHH:mm:ss[Z]');
const longOutput = parsed.format('LLLL');
const relativeOutput = parsed.fromNow();

console.log({ isoOutput, longOutput, relativeOutput });

Core APIs

| API | Description | | :--- | :--- | | moment(input) | Creates a local instance from strings, numbers, arrays, objects, and native Date values. | | moment(input, format, strict) | Parses using a declared token pattern and optional strict validation. | | moment.utc(input) | Creates a UTC-based moment instance. | | moment.parseZone(input) | Preserves the original offset encoded in the input string. | | moment.duration(value, unit) | Creates a duration for humanize, ISO serialization, and unit conversion. | | moment.locale(locale) | Sets the active locale for formatting and relative time output. | | moment.relativeTimeThreshold(unit, value) | Tunes relative time cutover thresholds. | | moment.relativeTimeRounding(fn) | Overrides rounding behavior for relative time strings. |


Browser Assets

The published package keeps the classic Moment.js distribution layout:

| File | Description | | :--- | :--- | | moment.js | Classic CommonJS/browser entry | | dist/moment.js | ESM-friendly build | | locale/ | Individual locale bundles | | min/moment.min.js | Browser-ready minified build | | min/locales.min.js | Browser-ready locale bundle | | min/moment-with-locales.min.js | Browser-ready build with locales included | | moment.d.ts | TypeScript declarations | | ts3.1-typings/ | Alternate declarations for TS 3.1+ consumers |


Run Locally

npm install
npm run lint
npm test
npm run build
npm run build:docs

Publishing

npm run build:package
npm run build:docs
npm run pack:check

License

MIT. See LICENSE.


Credits

  • Original project: Iskren Ivov Chernev and the Moment.js contributors
  • Upstream repository: https://github.com/moment/moment
  • Maintained by: Alexandroit