changelog-filename-regex

A regular expression that matches a CHANGELOG filename

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
changelog-filename-regex
102.0.14 years ago7 years agoMinified + gzip package size for changelog-filename-regex in KB

Readme

changelog-filename-regex
npm version Build Status
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

Use
npm.
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