Wondering what’s next for npm?Check out our public roadmap! »

    changelog-filename-regex
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/changelog-filename-regex package

    2.0.1 • Public • Published

    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

    Install

    npm i changelog-filename-regex

    DownloadsWeekly Downloads

    77,810

    Version

    2.0.1

    License

    ISC

    Unpacked Size

    4.16 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar