changelog-filename-regex
v2.0.1
Published
A regular expression that matches a CHANGELOG filename
Downloads
883,304
Maintainers
Readme
changelog-filename-regex
A regular expression that matches a CHANGELOG filename
const changelogFilenameRegex = require('changelog-filename-regex');
changelogFilenameRegex.test('CHANGELOG.md'); //=> true
changelogFilenameRegex.test('README.txt'); //=> false
In most cases there is no need to use this regular expression directly. Developers would rather use is-changelog-path.
Installation
npm install changelog-filename-regex
API
import changelogFilenameRegex from 'changelog-filename-regex';
changelogFilenameRegex
Type: RegExp
// Returns `true`
changelogFilenameRegex.test('CHANGELOG');
changelogFilenameRegex.test('CHANGELOG.txt');
changelogFilenameRegex.test('CHANGELOG.md');
changelogFilenameRegex.test('ChangeLog');
changelogFilenameRegex.test('Release Note');
changelogFilenameRegex.test('UPDATES');
changelogFilenameRegex.test('History.rdoc');
// Returns `false`
changelogFilenameRegex.test('LICENSE');
changelogFilenameRegex.test('change.log');
changelogFilenameRegex.test('CHANGE\nLOG');
changelogFilenameRegex.test(' changelog ');
changelogFilenameRegex.test('\u0000ChangeLog');
changelogFilenameRegex.test('CHANGELOG.');
License
ISC License © 2018 Shinnosuke Watanabe