Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/filter-changelog-paths
Extract CHANGELOG-like paths from multiple file paths
https://github.com/shinnn/filter-changelog-paths
Last synced: 27 days ago
JSON representation
Extract CHANGELOG-like paths from multiple file paths
- Host: GitHub
- URL: https://github.com/shinnn/filter-changelog-paths
- Owner: shinnn
- License: mit
- Created: 2015-11-30T09:36:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T12:09:47.000Z (over 7 years ago)
- Last Synced: 2024-10-01T22:16:14.966Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filter-changelog-paths
[![NPM version](https://img.shields.io/npm/v/filter-changelog-paths.svg)](https://www.npmjs.com/package/filter-changelog-paths)
[![Build Status](https://travis-ci.org/shinnn/filter-changelog-paths.svg?branch=master)](https://travis-ci.org/shinnn/filter-changelog-paths)
[![Build status](https://ci.appveyor.com/api/projects/status/7yw5cmfmry41iu9m/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/filter-changelog-paths/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/filter-changelog-paths.svg)](https://coveralls.io/github/shinnn/filter-changelog-paths)
[![dependencies Status](https://david-dm.org/shinnn/filter-changelog-paths/status.svg)](https://david-dm.org/shinnn/filter-changelog-paths)
[![devDependencies Status](https://david-dm.org/shinnn/filter-changelog-paths/dev-status.svg)](https://david-dm.org/shinnn/filter-changelog-paths?type=dev)A [Node](https://nodejs.org/) module to extract CHANGELOG-like paths from multiple file paths
```javascript
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.](https://docs.npmjs.com/cli/install)
```
npm install filter-changelog-paths
```## API
```javascript
const filterChangelogPaths = require('filter-changelog-paths');
```### filterChangelogPaths(*filePaths*)
*filePaths*: `Array` of strings (file [path](http://www.linfo.org/path.html)s)
Return: `Array` of stringsIt [filters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) a given array by using [is-changelog-path](https://github.com/shinnn/is-changelog-path) as a filter function.
```javascript
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 stringsAlways interact in a [posix](https://www.opengroup.org/austin/papers/posix_faq.html) compatible way.
```javascript
filterChangelogPaths.posix(['dir\\releases']); //=> []
```### filterChangelogPaths.win32(*filePaths*)
*filePaths*: `Array` of strings (file paths)
Return: `Array` of stringsAlways interact in a [win32](https://msdn.microsoft.com/library/cc433218) compatible way.
```javascript
filterChangelogPaths.win32(['dir\\releases']); //=> ['dir\\releases']
```## License
Copyright (c) 2015 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)
Licensed under [the MIT License](./LICENSE).