unlink-broken-links

0.1.0 • Public • Published

unlink-broken-links Build Status

Find broken symlinks and destroy them

Install

$ npm install -g unlink-broken-links

Usage

unlink-broken-links [directory]

Options:
  --version        Show version number                                 [boolean]
  --recursive, -r  Recursively walk the directory     [boolean] [default: false]
  --help, -h       Show help                                           [boolean]

Programmatic API

var unlinkBrokenLinks = require('unlink-broken-links');
 
// "recursive" defaults to false
unlinkBrokenLinks('/some/path', {recursive: true})
  .then(function(result) {
    console.log(result.removed); // array of removed files (if any)
    console.log(result.errors); // array of errors (if any)
  });
 
// or callback-style
unlinkBrokenLinks('/some/path', {recursive: true}, function(err, result) {
  // "err" will only be truthy if something's terribly wrong 
  console.log(result.removed); // array of removed files (if any)
  console.log(result.errors); // array of errors (if any)
});

License

© 2015 Christopher Hiller. Licensed MIT.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i unlink-broken-links

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • boneskull