Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zkochan/ignorable
Detects whether a file in a package can be ignored
https://github.com/zkochan/ignorable
Last synced: 29 days 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T21:52:45.000Z (about 7 years ago)
- Last Synced: 2024-11-25T08:45:09.805Z (about 2 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
[![npm version](https://img.shields.io/npm/v/ignorable.svg)](https://www.npmjs.com/package/ignorable) [![Build Status](https://img.shields.io/travis/zkochan/ignorable/master.svg)](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/)