JSPM

filter-changelog-paths

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q33739F
  • License MIT

Extract CHANGELOG-like paths from multiple file paths

Package Exports

  • filter-changelog-paths

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (filter-changelog-paths) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

filter-changelog-paths

NPM version Build Status Build status Coverage Status Dependency Status devDependency Status

A Node module to extract CHANGELOG-like paths from multiple file paths

const filterChangelogPaths = require('filter-changelog-paths');

filterChangelogPaths([
  'CHANGELOG.txt',
  'CONTRIBUTING',
  'project/docs/release_notes.md',
  'lib/index.js'
]);
//=> ['CHANGELOG.txt', 'project/docs/release_notes.md']

Installation

Use npm.

npm install filter-changelog-paths

API

const filterChangelogPaths = require('filter-changelog-paths');

filterChangelogPaths(filePaths)

filePaths: Array of strings (file paths)
Return: Array of strings

It filters a given array by using is-changelog-path as a filter function.

const filterChangelogPaths = require('filter-changelog-paths');

filterChangelogPaths([]); //=> []

filterChangelogPaths('changelog'); // throws a type error
filterChangelogPaths(['changelog', 1, 'history', true]); // throws a type error
filterChangelogPaths(); // throws a type error

filterChangelogPaths.posix(filePaths)

filePaths: Array of strings (file paths)
Return: Array of strings

Always interact in a posix compatible way.

filterChangelogPaths.posix(['dir\\releases']); //=> []

filterChangelogPaths.win32(filePaths)

filePaths: Array of strings (file paths)
Return: Array of strings

Always interact in a win32 compatible way.

filterChangelogPaths.win32(['dir\\releases']); //=> ['dir\\releases']

License

Copyright (c) 2015 Shinnosuke Watanabe

Licensed under the MIT License.