https://github.com/zkochan/ignorable
Detects whether a file in a package can be ignored
https://github.com/zkochan/ignorable
Last synced: 3 months ago
JSON representation
Detects whether a file in a package can be ignored
- Host: GitHub
- URL: https://github.com/zkochan/ignorable
- Owner: zkochan
- License: mit
- Created: 2017-07-26T05:27:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T21:52:45.000Z (over 7 years ago)
- Last Synced: 2025-03-09T08:41:07.051Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ignorable
> Detects whether a file in a package can be ignored
[](https://www.npmjs.com/package/ignorable) [](https://travis-ci.org/zkochan/ignorable)
## Installation
```sh
npm i -S ignorable
```## Usage
```js
const ignorable = require('ignorable')console.log(ignorable('readme.md'))
//> trueconsole.log(ignorable('test.js'))
//> trueconsole.log(ignorable.safe('test.js'))
//> false
```## API
### `ignorable(filename)`
Returns whether `true` if the file does not influence the functionality of the package.
### `ignorable.safe(filename)`
Safer than `ignorable()`. Does not return `true` for resources that might be dangerous to remove.
## License
[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)