Skip to content
JS
Package

module-definition

Determines if a file is using a CommonJS or AMD module definition

v7.0.0, 19 May 2026MITESM onlyTypes: None
$ npm install module-definition

Key numbers

As of 25 Sept 2026
Weekly downloads
3.3m
+37% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
4 months ago
v7.0.0
GitHub stars
9
5 forks
Open issues / PRs
0 / 1
Contributors
-
Commits, last 52 weeks
31

Downloads

Last week 2026-09-15 to 2026-09-21
02m4m6mSept 2025Mar 2026Sept 2026High 4.9m (18 Aug 2026)Low 1.2m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

3,293,025 downloads last week, 17,012,703 in the last month. The 12-month change of +37% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
233 in total
Latest version
7.0.0, 19 May 20264 months ago
First published
18 Mar 2014
Last push to GitHub
10 Sept 202615 days before the snapshot
Repository archived
No
Open issues
0
Open pull requests
1
Commits, last 52 weeks
31
Dependents on npm
-

Major versions

  1. v7 first release 7.0.0, 19 May 2026
  2. v6 first release 6.0.0, 10 Apr 2024
  3. v5 first release 5.0.0, 4 May 2023
  4. v4 first release 4.0.0, 3 Mar 2022
  5. v3 first release 3.0.0, 31 Aug 2018
  6. v2 first release 2.0.0, 31 Oct 2014
  7. v1 first release 1.0.0, 18 Mar 2014

Recent releases

VersionPublished
7.0.019 May 2026
6.0.220 Apr 2026
6.0.11 Feb 2025
6.0.010 Apr 2024
5.0.111 May 2023
5.0.04 May 2023
4.1.019 Mar 2023
4.0.03 Mar 2022
3.4.022 Feb 2022
3.3.11 Nov 2020
3.3.023 Nov 2019
3.2.018 Mar 2019
3.1.025 Sept 2018
3.0.031 Aug 2018
Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
>=20.19.0 || >=22.12.0
Runtimes
-
Unpacked size (npm)
7.1 kB
Dependencies (2)
ast-module-typesnode-source-walk
npm install module-definition
  • jsDelivrhttps://cdn.jsdelivr.net/npm/module-definition@7.0.0/
  • unpkghttps://unpkg.com/module-definition@7.0.0/
  • esm.shhttps://esm.sh/module-definition@7.0.0
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): no category.