@release-notes/changelog-parser
Version:
Parse CHANGELOG.md, HISTORY.md and derivative markdown files into js objects.
40 lines (27 loc) • 1.37 kB
Markdown
# Release Notes Changelog Parser
[](https://release-notes.com/@release-notes/changelog-parser)
[](https://www.npmjs.com/package/@release-notes/changelog-parser)
[](LICENSE)
## About
The changelog parser reads CHANGELOG.md files and derivatives and converts them to
release notes objects with a standardized schema.
This allows further processing of changelog files and provides an unified access to information
on version and even atomic modification level.
## Installation
```bash
$ yarn add @release-notes/changelog-parser
$ npm i --save @release-notes/changelog-parser
```
## Usage
```js
const changelogParser = require('@release-notes/changelog-parser');
const fs = require('fs');
const changelog = fs.readFileSync('./CHANGELOG.md');
const releaseNotes = changelogParser.parse(changelog);
const json = releaseNotes.toJSON();
```
The changelog parser returns an instance of [ReleaseNotes](https://github.com/release-notes/release-notes-node/blob/develop/lib/models/ReleaseNotes.js).
---
### LICENSE
The files in this archive are released under MIT license.
You can find a copy of this license in [LICENSE](LICENSE).