Package
gray-matter
Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters. Used by metalsmith, assemble, verb and
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 7.1m
- +221% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 4
- Direct, from package.json
- Last release
- 5 years ago
- v4.0.3
- GitHub stars
- 4.5k
- 169 forks
- Open issues / PRs
- 54 / 27
- Contributors
- -
- Commits, last 52 weeks
- 0
Downloads
Last week 2026-09-15 to 2026-09-21
7,081,736 downloads last week, 33,503,692 in the last month. The 12-month change of +221% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- 055 in total
- Latest version
- 4.0.3, 24 Apr 20215 years ago
- First published
- 28 Jan 2014
- Last push to GitHub
- 14 Jun 2025467 days before the snapshot
- Repository archived
- No
- Open issues
- 54
- Open pull requests
- 27
- Commits, last 52 weeks
- 0
- Dependents on npm
- 5,238
Major versions
- v4 first release 4.0.0, 2 Apr 2018
- v3 first release 3.0.0, 30 Jun 2017
- v2 first release 2.0.0, 26 Mar 2015
- v1 first release 1.0.0, 5 Dec 2014
- v0 first release 0.1.0, 28 Jan 2014
Recent releases
| Version | Published |
|---|---|
| 4.0.3 | 24 Apr 2021 |
| 4.0.2 | 11 Jan 2019 |
| 4.0.1 | 2 Apr 2018 |
| 4.0.0 | 2 Apr 2018 |
| 3.1.1 | 21 Oct 2017 |
| 3.1.0 | 19 Oct 2017 |
| 3.0.8 | 5 Oct 2017 |
| 3.0.7 | 22 Sept 2017 |
| 3.0.6 | 15 Sept 2017 |
| 3.0.5 | 14 Sept 2017 |
| 3.0.4 | 14 Sept 2017 |
| 3.0.3 | 19 Aug 2017 |
| 3.0.2 | 1 Jul 2017 |
| 3.0.1 | 30 Jun 2017 |
- Module format
- CommonJSFrom package.json type, main and exports fields
- TypeScript types
- Bundled
- Node.js engine range
- >=6.0
- Runtimes
- -
- Unpacked size (npm)
- 38 kB
- Dependencies (4)
js-yamlkind-ofsection-matterstrip-bom-string
npm install gray-matter- jsDelivr
https://cdn.jsdelivr.net/npm/gray-matter@4.0.3/ - unpkg
https://unpkg.com/gray-matter@4.0.3/ - esm.sh
https://esm.sh/gray-matter@4.0.3
| Package | Weekly downloads | Gzip | Last release | Module | Comparison |
|---|---|---|---|---|---|
| @11ty/gray-matter | 429.3k | - | 1 month ago | CommonJS | - |
| micromark-extension-frontmatter | 5.4m | - | 3 years ago | ESM only | - |
| mdast-util-from-markdown | 40.6m | - | 7 months ago | ESM only | - |
| @textlint/fixer-formatter | 128.3k | - | 1 month ago | CommonJS | - |
| tablemark | 71.8k | - | 1 year ago | ESM only | - |
| @marp-team/marp-core | 98.1k | - | 2 months ago | CommonJS | - |
| marked | 55.3m | - | 2 days ago | ESM only | - |
| mdast-util-to-string | 42m | - | 3 years ago | ESM only | - |
Indexability: Indexed.