Skip to content

Commit

Permalink
feat(use): Describe how to use fro another module, closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Dec 8, 2015
1 parent 635937d commit cb20fbb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ Add to your project `npm install --save-dev ban-sensitive-files`
}
```

* You can use the checker from another module

```js
var isBanned = require('ban-sensitive-files');
isBanned('path/file/name');
// checks single file, returns true or false
// prints any errors to console.error
isBanned(['name1', 'name2', 'name3']);
// checks list of files
isBanned('file/name', logger);
// use provided logger function instead of console.error
```

## Advanced

To figure out what the script is doing, enable debug logging
Expand Down

0 comments on commit cb20fbb

Please sign in to comment.