license-tree

1.0.0 • Public • Published

license-tree

Read a tree of files and check for licenses.

Usage

const path = require('path');
const licenseTree = require('license-tree');
 
const checkDir = path.resolve('path', 'to', 'check');
 
licenseTree({ dir: checkDir }, function (err, licenses) {
  if (err) { throw err; /* handle me */ }
 
  //
  // Returns the licenses found and the full path of the files
  // they were found in.
  //
  // [{ license: 'MIT', file: 'path/to/check/file/with/MIT/license' }]
  //
  console.dir(licenses);
});

Tests

npm test
Author: Charlie Robbins
LICENSE: MIT

Versions

Current Tags

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

Version History

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

Package Sidebar

Install

npm i license-tree

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • indexzero