Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    license-treepublic

    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

    install

    npm i license-tree

    Downloadslast 7 days

    3

    version

    1.0.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar