Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

nlf

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlf - npm Package Compare versions

Comparing version
0.2.5
to
0.2.6
+1
-1
lib-cov/file-source.js

@@ -66,2 +66,2 @@ /* automatically generated by JSCoverage - do not edit */

module.exports = FileSource;
_$jscoverage['file-source.js'].source = ["/**"," * @description A file source for a potential license"," *"," * @author Ian Kelly"," * @copyright Copyright (C) Ian Kelly 2013"," *"," * @license The MIT License"," */","","'use strict';","","var licenseFind = require('./license-find'),","\tfs = require('fs');","","/**"," * Constructor"," * "," * @param {String} filePath Path of the file"," * @returns {Object} \t\tThe FileSource object"," */","function FileSource(filePath) {","","\tif (typeof filePath !== 'string') {","\t\tthrow new Error('filePath must be a string');","\t}","","\tthis.filePath = filePath;","\tthis.text = '';","","\treturn this;","}","","/**"," * Read the file"," * "," * @param {Function} callback Callback (err)"," */","FileSource.prototype.read = function (callback) {","","\tvar self = this;","","\tfs.readFile(this.filePath, 'utf-8', function (err, data) {","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\tself.text = data;","\t\tcallback(null);","\t});","};","","/**"," * Returns which licenses this file potentially declares"," * "," * @return {Array} Array of license name strings"," */","FileSource.prototype.names = function () {","","\treturn licenseFind(this.text);","","};","","","module.exports = FileSource;"];
_$jscoverage['file-source.js'].source = ["/**"," * @description A file source for a potential license"," *"," * @author Ian Kelly"," * @copyright Copyright (C) Ian Kelly 2013"," *"," * @license The MIT License"," */","","'use strict';","","var licenseFind = require('./license-find'),","\tfs = require('fs');","","/**"," * Constructor"," * "," * @param {String} filePath Path of the file"," * @returns {Object}\t\tThe FileSource object"," */","function FileSource(filePath) {","","\tif (typeof filePath !== 'string') {","\t\tthrow new Error('filePath must be a string');","\t}","","\tthis.filePath = filePath;","\tthis.text = '';","","\treturn this;","}","","/**"," * Read the file"," * "," * @param {Function} callback Callback (err)"," */","FileSource.prototype.read = function (callback) {","","\tvar self = this;","","\tfs.readFile(this.filePath, 'utf-8', function (err, data) {","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\tself.text = data;","\t\tcallback(null);","\t});","};","","/**"," * Returns which licenses this file potentially declares"," * "," * @return {Array} Array of license name strings"," */","FileSource.prototype.names = function () {","","\treturn licenseFind(this.text);","","};","","","module.exports = FileSource;"];

@@ -35,15 +35,15 @@ /* automatically generated by JSCoverage - do not edit */

_$jscoverage['formatters/csv.js'][43]++;
if (! Array.isArray(licenseData)) {
if (typeof callback !== "function") {
_$jscoverage['formatters/csv.js'][44]++;
return callback(new Error("licenseData must be an array"));
throw new Error("must have a callback");
}
_$jscoverage['formatters/csv.js'][47]++;
if (licenseData.length < 1) {
if (! Array.isArray(licenseData)) {
_$jscoverage['formatters/csv.js'][48]++;
return callback(new Error("must have at least one module in data"));
return callback(new Error("licenseData must be an array"));
}
_$jscoverage['formatters/csv.js'][51]++;
if (typeof callback !== "function") {
if (licenseData.length < 1) {
_$jscoverage['formatters/csv.js'][52]++;
return callback(new Error("must have a callback"));
return callback(new Error("must have at least one module in data"));
}

@@ -64,2 +64,2 @@ _$jscoverage['formatters/csv.js'][55]++;

module.exports = {render: render};
_$jscoverage['formatters/csv.js'].source = ["/**"," * @description csv output formatter"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly 2013"," * @license MIT"," */","","'use strict';","","var heading = 'name,version,directory,repository,summary,' +","\t\t\t'from package.json,from license,from readme';","","","/**"," * Returns a single csv line for a module record"," * "," * @param {Object} moduleRecord The module's license record"," * @return {String} The record turned into a CSV record"," */","function recordToCsv(moduleRecord) {","","\t// @todo - what do do if any of the data contains a comma?","\t// put double quotes around the value?","\treturn moduleRecord.name + ',' +","\t\t\tmoduleRecord.version + ',' +","\t\t\tmoduleRecord.directory + ',' +","\t\t\tmoduleRecord.repository + ',' +","\t\t\tmoduleRecord.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.package.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.license.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.readme.summary().join(';');","}","","/**"," * Render the license data"," * "," * @param {Array} licenseData An array of module licence data"," * @param {Function} callback The callback (err, output string)"," */","function render(licenseData, callback) {","","\tif (!Array.isArray(licenseData)) {","\t\treturn callback(new Error('licenseData must be an array'));","\t}","","\tif (licenseData.length &lt; 1) {","\t\treturn callback(new Error('must have at least one module in data'));","\t}","","\tif (typeof callback !== 'function') {","\t\treturn callback(new Error('must have a callback'));","\t}","","\tvar output = [];","","\toutput.push(heading);","","\tlicenseData.forEach(function (module) {","\t\toutput.push(recordToCsv(module));","\t});","","\tcallback(null, output.join('\\n'));","}","","","module.exports = {","\trender: render","};"];
_$jscoverage['formatters/csv.js'].source = ["/**"," * @description csv output formatter"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly 2013"," * @license MIT"," */","","'use strict';","","var heading = 'name,version,directory,repository,summary,' +","\t\t\t'from package.json,from license,from readme';","","","/**"," * Returns a single csv line for a module record"," * "," * @param {Object} moduleRecord The module's license record"," * @return {String} The record turned into a CSV record"," */","function recordToCsv(moduleRecord) {","","\t// @todo - what do do if any of the data contains a comma?","\t// put double quotes around the value?","\treturn moduleRecord.name + ',' +","\t\t\tmoduleRecord.version + ',' +","\t\t\tmoduleRecord.directory + ',' +","\t\t\tmoduleRecord.repository + ',' +","\t\t\tmoduleRecord.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.package.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.license.summary().join(';') + ',' +","\t\t\tmoduleRecord.licenseSources.readme.summary().join(';');","}","","/**"," * Render the license data"," * "," * @param {Array} licenseData An array of module licence data"," * @param {Function} callback The callback (err, output string)"," */","function render(licenseData, callback) {","","\tif (typeof callback !== 'function') {","\t\tthrow new Error('must have a callback');","\t}","","\tif (!Array.isArray(licenseData)) {","\t\treturn callback(new Error('licenseData must be an array'));","\t}","","\tif (licenseData.length &lt; 1) {","\t\treturn callback(new Error('must have at least one module in data'));","\t}","","\tvar output = [];","","\toutput.push(heading);","","\tlicenseData.forEach(function (module) {","\t\toutput.push(recordToCsv(module));","\t});","","\tcallback(null, output.join('\\n'));","}","","","module.exports = {","\trender: render","};"];

@@ -67,15 +67,15 @@ /* automatically generated by JSCoverage - do not edit */

_$jscoverage['formatters/standard.js'][57]++;
if (! Array.isArray(licenseData)) {
if (typeof callback !== "function") {
_$jscoverage['formatters/standard.js'][58]++;
return callback(new Error("licenseData must be an array"));
throw new Error("must have a callback");
}
_$jscoverage['formatters/standard.js'][61]++;
if (licenseData.length < 1) {
if (! Array.isArray(licenseData)) {
_$jscoverage['formatters/standard.js'][62]++;
return callback(new Error("must have at least one module in data"));
return callback(new Error("licenseData must be an array"));
}
_$jscoverage['formatters/standard.js'][65]++;
if (typeof callback !== "function") {
if (licenseData.length < 1) {
_$jscoverage['formatters/standard.js'][66]++;
return callback(new Error("must have a callback"));
return callback(new Error("must have at least one module in data"));
}

@@ -94,2 +94,2 @@ _$jscoverage['formatters/standard.js'][69]++;

module.exports = {render: render};
_$jscoverage['formatters/standard.js'].source = ["/**"," * @description Standard console output formatter"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly 2013"," * @license MIT"," */","","'use strict';","","var archy = require('archy');","","/**"," * Create the output string for a single module"," * "," * @param {Object} moduleData The module license data"," * @return {String} An archy formatted string"," */","function createModuleNode(moduleData) {","","\tvar output = {","\t\tlabel: moduleData.id","\t\t\t+ ' [license(s): '","\t\t\t+ moduleData.summary().join(', ')","\t\t\t+ ']',","\t\tnodes: []","\t},","\t\tsummary;","","\tsummary = moduleData.licenseSources.package.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('package.json: ' + summary.join(', '));","\t}","","\tsummary = moduleData.licenseSources.license.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('license files: ' + summary.join(', '));","\t}","","\tsummary = moduleData.licenseSources.readme.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('readme files: ' + summary.join(', '));","\t}","","\treturn archy(output);","}","","","/**"," * Render the license data"," * "," * @param {Array} licenseData An array of module licence data"," * @param {Function} callback The callback (err, output string)"," */","function render(licenseData, callback) {","","\tif (!Array.isArray(licenseData)) {","\t\treturn callback(new Error('licenseData must be an array'));","\t}","","\tif (licenseData.length &lt; 1) {","\t\treturn callback(new Error('must have at least one module in data'));","\t}","","\tif (typeof callback !== 'function') {","\t\treturn callback(new Error('must have a callback'));","\t}","","\tvar output = [];","","\tlicenseData.forEach(function (module) {","\t\toutput.push(createModuleNode(module));","\t});","","\tcallback(null, output.join('\\n'));","}","","","module.exports = {","\trender: render","};"];
_$jscoverage['formatters/standard.js'].source = ["/**"," * @description Standard console output formatter"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly 2013"," * @license MIT"," */","","'use strict';","","var archy = require('archy');","","/**"," * Create the output string for a single module"," * "," * @param {Object} moduleData The module license data"," * @return {String} An archy formatted string"," */","function createModuleNode(moduleData) {","","\tvar output = {","\t\tlabel: moduleData.id","\t\t\t+ ' [license(s): '","\t\t\t+ moduleData.summary().join(', ')","\t\t\t+ ']',","\t\tnodes: []","\t},","\t\tsummary;","","\tsummary = moduleData.licenseSources.package.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('package.json: ' + summary.join(', '));","\t}","","\tsummary = moduleData.licenseSources.license.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('license files: ' + summary.join(', '));","\t}","","\tsummary = moduleData.licenseSources.readme.summary();","\tif (summary.length &gt; 0) {","\t\toutput.nodes.push('readme files: ' + summary.join(', '));","\t}","","\treturn archy(output);","}","","","/**"," * Render the license data"," * "," * @param {Array} licenseData An array of module licence data"," * @param {Function} callback The callback (err, output string)"," */","function render(licenseData, callback) {","","\tif (typeof callback !== 'function') {","\t\tthrow new Error('must have a callback');","\t}","","\tif (!Array.isArray(licenseData)) {","\t\treturn callback(new Error('licenseData must be an array'));","\t}","","\tif (licenseData.length &lt; 1) {","\t\treturn callback(new Error('must have at least one module in data'));","\t}","","\tvar output = [];","","\tlicenseData.forEach(function (module) {","\t\toutput.push(createModuleNode(module));","\t});","","\tcallback(null, output.join('\\n'));","}","","","module.exports = {","\trender: render","};"];

@@ -7,13 +7,13 @@ /* automatically generated by JSCoverage - do not edit */

_$jscoverage['license-find.js'][16] = 0;
_$jscoverage['license-find.js'][71] = 0;
_$jscoverage['license-find.js'][73] = 0;
_$jscoverage['license-find.js'][79] = 0;
_$jscoverage['license-find.js'][80] = 0;
_$jscoverage['license-find.js'][81] = 0;
_$jscoverage['license-find.js'][82] = 0;
_$jscoverage['license-find.js'][83] = 0;
_$jscoverage['license-find.js'][84] = 0;
_$jscoverage['license-find.js'][85] = 0;
_$jscoverage['license-find.js'][91] = 0;
_$jscoverage['license-find.js'][86] = 0;
_$jscoverage['license-find.js'][88] = 0;
_$jscoverage['license-find.js'][94] = 0;
_$jscoverage['license-find.js'][95] = 0;
_$jscoverage['license-find.js'][96] = 0;
_$jscoverage['license-find.js'][97] = 0;
_$jscoverage['license-find.js'][98] = 0;
_$jscoverage['license-find.js'][99] = 0;
_$jscoverage['license-find.js'][100] = 0;
_$jscoverage['license-find.js'][106] = 0;
_$jscoverage['license-find.js'][109] = 0;
}

@@ -23,20 +23,20 @@ _$jscoverage['license-find.js'][14]++;

_$jscoverage['license-find.js'][16]++;
var patterns = [{"name": "BSD", "regex": [/\sBSD\s/]}, {"name": "GPL", "regex": [/\sGPL\s/, /\sGPLv2\s/]}, {"name": "LGPL", "regex": [/\sLGPL\s/]}, {"name": "MIT", "regex": [/\sMIT\s/, /\s\(MIT\)\s/]}, {"name": "Apache", "regex": [/\sApache\sLicen[cs]e\s/i]}, {"name": "MPL", "regex": [/\sMPL\s/]}, {"name": "WTFPL", "regex": [/\sDO\sWHAT\sTHE\sFUCK\sYOU\sWANT\sTO\sPUBLIC\sLICEN[CS]E\s/i]}], excludePattern = /@@NLF-IGNORE@@/;
_$jscoverage['license-find.js'][71]++;
var patterns = [{"name": "BSD", "regex": [/(?:^|\s)BSD\s/]}, {"name": "GPL", "regex": [/(?:^|\s)GPL\s/, /(?:^|\s)GPLv\d\s/]}, {"name": "LGPL", "regex": [/(?:^|\s)LGPL\s/]}, {"name": "MIT", "regex": [/(?:^|\s)MIT\s/, /(?:^|\s)\(MIT\)\s/]}, {"name": "Apache", "regex": [/(?:^|\s)Apache\sLicen[cs]e\s/i]}, {"name": "MPL", "regex": [/(?:^|\s)MPL\s/]}, {"name": "WTFPL", "regex": [/(?:^|\s)WTFPL\s/, /(?:^|\s)DO\sWHAT\sTHE\sFUCK\sYOU\sWANT\sTO\sPUBLIC\sLICEN[CS]E\s/i]}, {"name": "ISC", "regex": [/(?:^|\s)ISC\s/, /(?:^|\s)\(ISC\)\s/]}, {"name": "Eclipse Public License", "regex": [/(?:^|\s)Eclipse\sPublic\sLicen[cs]e\s/i, /(?:^|\s)EPL\s/, /(?:(?:^|\s)|\()EPL-1\.0(?:\)|\s)/]}], excludePattern = /@@NLF-IGNORE@@/;
_$jscoverage['license-find.js'][86]++;
function identifyLicense(text) {
_$jscoverage['license-find.js'][73]++;
_$jscoverage['license-find.js'][88]++;
var licenseIndex, regexIndex, pattern, output = [];
_$jscoverage['license-find.js'][79]++;
_$jscoverage['license-find.js'][94]++;
if (! excludePattern.test(text)) {
_$jscoverage['license-find.js'][80]++;
_$jscoverage['license-find.js'][95]++;
for (licenseIndex = patterns.length - 1; licenseIndex >= 0; licenseIndex--) {
_$jscoverage['license-find.js'][81]++;
_$jscoverage['license-find.js'][96]++;
pattern = patterns[licenseIndex];
_$jscoverage['license-find.js'][82]++;
_$jscoverage['license-find.js'][97]++;
for (regexIndex = pattern.regex.length - 1; regexIndex >= 0; regexIndex--) {
_$jscoverage['license-find.js'][83]++;
_$jscoverage['license-find.js'][98]++;
if (pattern.regex[regexIndex].test(text)) {
_$jscoverage['license-find.js'][84]++;
_$jscoverage['license-find.js'][99]++;
output.push(pattern.name);
_$jscoverage['license-find.js'][85]++;
_$jscoverage['license-find.js'][100]++;
break;

@@ -47,7 +47,7 @@ }

}
_$jscoverage['license-find.js'][91]++;
_$jscoverage['license-find.js'][106]++;
return output.sort();
}
_$jscoverage['license-find.js'][94]++;
_$jscoverage['license-find.js'][109]++;
module.exports = identifyLicense;
_$jscoverage['license-find.js'].source = ["/**"," *"," * @description Module for identifying license from a text string"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly"," *"," * @license The MIT License"," *"," * @@NLF-IGNORE@@"," * "," */","","'use strict';","","var patterns = [ {","\t\t'name': 'BSD',","\t\t'regex': [","\t\t\t/\\sBSD\\s/","\t\t]","\t},","\t{","\t\t'name': 'GPL',","\t\t'regex': [","\t\t\t/\\sGPL\\s/,","\t\t\t/\\sGPLv2\\s/","\t\t]","\t},","\t{","\t\t'name': 'LGPL',","\t\t'regex': [","\t\t\t/\\sLGPL\\s/","\t\t]","\t},","\t{","\t\t'name': 'MIT',","\t\t'regex' : [","\t\t\t/\\sMIT\\s/,","\t\t\t/\\s\\(MIT\\)\\s/","\t\t]","\t},","\t{","\t\t'name': 'Apache',","\t\t'regex': [","\t\t\t/\\sApache\\sLicen[cs]e\\s/i","\t\t]","\t},","\t{","\t\t'name': 'MPL',","\t\t'regex': [","\t\t\t/\\sMPL\\s/","\t\t]","\t},","\t{","\t\t'name': 'WTFPL',","\t\t'regex': [","\t\t\t/\\sDO\\sWHAT\\sTHE\\sFUCK\\sYOU\\sWANT\\sTO\\sPUBLIC\\sLICEN[CS]E\\s/i","\t\t]","","\t}","],","\t// pattern to deliberately exclude a file","\texcludePattern = /@@NLF-IGNORE@@/;","","/**"," * Identifies potential license text"," * "," * @param {String} text The text to scan"," * @return {Array} Array of potential license names"," */","function identifyLicense(text) {","","\tvar licenseIndex,","\t\tregexIndex,","\t\tpattern,","\t\toutput = [];","","\t// ignore files that have the ignore flag - e.g. the nfl project itself","\tif (!excludePattern.test(text)) {","\t\tfor (licenseIndex = patterns.length - 1; licenseIndex &gt;= 0; licenseIndex--) {","\t\t\tpattern = patterns[licenseIndex];","\t\t\tfor (regexIndex = pattern.regex.length - 1; regexIndex &gt;= 0; regexIndex--) {","\t\t\t\tif (pattern.regex[regexIndex].test(text)) {","\t\t\t\t\toutput.push(pattern.name);","\t\t\t\t\tbreak;","\t\t\t\t}","\t\t\t}","\t\t}","\t}","","\treturn output.sort();","}","","module.exports = identifyLicense;"];
_$jscoverage['license-find.js'].source = ["/**"," *"," * @description Module for identifying license from a text string"," * @author Ian Kelly"," *"," * @copyright Copyright (C) Ian Kelly"," *"," * @license The MIT License"," *"," * @@NLF-IGNORE@@"," * "," */","","'use strict';","","var patterns = [ {","\t\t'name': 'BSD',","\t\t'regex': [","\t\t\t/(?:^|\\s)BSD\\s/","\t\t]","\t},","\t{","\t\t'name': 'GPL',","\t\t'regex': [","\t\t\t/(?:^|\\s)GPL\\s/,","\t\t\t/(?:^|\\s)GPLv\\d\\s/","\t\t]","\t},","\t{","\t\t'name': 'LGPL',","\t\t'regex': [","\t\t\t/(?:^|\\s)LGPL\\s/","\t\t]","\t},","\t{","\t\t'name': 'MIT',","\t\t'regex' : [","\t\t\t/(?:^|\\s)MIT\\s/,","\t\t\t/(?:^|\\s)\\(MIT\\)\\s/","\t\t]","\t},","\t{","\t\t'name': 'Apache',","\t\t'regex': [","\t\t\t/(?:^|\\s)Apache\\sLicen[cs]e\\s/i","\t\t]","\t},","\t{","\t\t'name': 'MPL',","\t\t'regex': [","\t\t\t/(?:^|\\s)MPL\\s/","\t\t]","\t},","\t{","\t\t'name': 'WTFPL',","\t\t'regex': [","\t\t\t/(?:^|\\s)WTFPL\\s/,","\t\t\t/(?:^|\\s)DO\\sWHAT\\sTHE\\sFUCK\\sYOU\\sWANT\\sTO\\sPUBLIC\\sLICEN[CS]E\\s/i","\t\t]","\t},","\t{","\t\t'name': 'ISC',","\t\t'regex': [","\t\t\t/(?:^|\\s)ISC\\s/,","\t\t\t/(?:^|\\s)\\(ISC\\)\\s/","\t\t]","\t},","\t{","\t\t'name': 'Eclipse Public License',","\t\t'regex': [","\t\t\t/(?:^|\\s)Eclipse\\sPublic\\sLicen[cs]e\\s/i,","\t\t\t/(?:^|\\s)EPL\\s/,","\t\t\t/(?:(?:^|\\s)|\\()EPL-1\\.0(?:\\)|\\s)/","\t\t]","\t}","],","\t// pattern to deliberately exclude a file","\texcludePattern = /@@NLF-IGNORE@@/;","","/**"," * Identifies potential license text"," * "," * @param {String} text The text to scan"," * @return {Array} Array of potential license names"," */","function identifyLicense(text) {","","\tvar licenseIndex,","\t\tregexIndex,","\t\tpattern,","\t\toutput = [];","\t\t","\t// ignore files that have the ignore flag - e.g. the nfl project itself","\tif (!excludePattern.test(text)) {","\t\tfor (licenseIndex = patterns.length - 1; licenseIndex &gt;= 0; licenseIndex--) {","\t\t\tpattern = patterns[licenseIndex];","\t\t\tfor (regexIndex = pattern.regex.length - 1; regexIndex &gt;= 0; regexIndex--) {","\t\t\t\tif (pattern.regex[regexIndex].test(text)) {","\t\t\t\t\toutput.push(pattern.name);","\t\t\t\t\tbreak;","\t\t\t\t}","\t\t\t}","\t\t}","\t}","","\treturn output.sort();","}","","module.exports = identifyLicense;"];

@@ -7,110 +7,126 @@ /* automatically generated by JSCoverage - do not edit */

_$jscoverage['nlf.js'][13] = 0;
_$jscoverage['nlf.js'][31] = 0;
_$jscoverage['nlf.js'][34] = 0;
_$jscoverage['nlf.js'][32] = 0;
_$jscoverage['nlf.js'][35] = 0;
_$jscoverage['nlf.js'][38] = 0;
_$jscoverage['nlf.js'][43] = 0;
_$jscoverage['nlf.js'][36] = 0;
_$jscoverage['nlf.js'][39] = 0;
_$jscoverage['nlf.js'][44] = 0;
_$jscoverage['nlf.js'][45] = 0;
_$jscoverage['nlf.js'][46] = 0;
_$jscoverage['nlf.js'][51] = 0;
_$jscoverage['nlf.js'][62] = 0;
_$jscoverage['nlf.js'][65] = 0;
_$jscoverage['nlf.js'][74] = 0;
_$jscoverage['nlf.js'][78] = 0;
_$jscoverage['nlf.js'][47] = 0;
_$jscoverage['nlf.js'][52] = 0;
_$jscoverage['nlf.js'][63] = 0;
_$jscoverage['nlf.js'][66] = 0;
_$jscoverage['nlf.js'][75] = 0;
_$jscoverage['nlf.js'][79] = 0;
_$jscoverage['nlf.js'][84] = 0;
_$jscoverage['nlf.js'][87] = 0;
_$jscoverage['nlf.js'][90] = 0;
_$jscoverage['nlf.js'][80] = 0;
_$jscoverage['nlf.js'][85] = 0;
_$jscoverage['nlf.js'][88] = 0;
_$jscoverage['nlf.js'][91] = 0;
_$jscoverage['nlf.js'][93] = 0;
_$jscoverage['nlf.js'][95] = 0;
_$jscoverage['nlf.js'][92] = 0;
_$jscoverage['nlf.js'][94] = 0;
_$jscoverage['nlf.js'][96] = 0;
_$jscoverage['nlf.js'][100] = 0;
_$jscoverage['nlf.js'][103] = 0;
_$jscoverage['nlf.js'][106] = 0;
_$jscoverage['nlf.js'][97] = 0;
_$jscoverage['nlf.js'][101] = 0;
_$jscoverage['nlf.js'][104] = 0;
_$jscoverage['nlf.js'][107] = 0;
_$jscoverage['nlf.js'][108] = 0;
_$jscoverage['nlf.js'][111] = 0;
_$jscoverage['nlf.js'][116] = 0;
_$jscoverage['nlf.js'][118] = 0;
_$jscoverage['nlf.js'][124] = 0;
_$jscoverage['nlf.js'][109] = 0;
_$jscoverage['nlf.js'][112] = 0;
_$jscoverage['nlf.js'][117] = 0;
_$jscoverage['nlf.js'][119] = 0;
_$jscoverage['nlf.js'][125] = 0;
_$jscoverage['nlf.js'][140] = 0;
_$jscoverage['nlf.js'][142] = 0;
_$jscoverage['nlf.js'][126] = 0;
_$jscoverage['nlf.js'][141] = 0;
_$jscoverage['nlf.js'][143] = 0;
_$jscoverage['nlf.js'][146] = 0;
_$jscoverage['nlf.js'][144] = 0;
_$jscoverage['nlf.js'][147] = 0;
_$jscoverage['nlf.js'][151] = 0;
_$jscoverage['nlf.js'][153] = 0;
_$jscoverage['nlf.js'][148] = 0;
_$jscoverage['nlf.js'][152] = 0;
_$jscoverage['nlf.js'][154] = 0;
_$jscoverage['nlf.js'][157] = 0;
_$jscoverage['nlf.js'][161] = 0;
_$jscoverage['nlf.js'][155] = 0;
_$jscoverage['nlf.js'][158] = 0;
_$jscoverage['nlf.js'][162] = 0;
_$jscoverage['nlf.js'][165] = 0;
_$jscoverage['nlf.js'][163] = 0;
_$jscoverage['nlf.js'][166] = 0;
_$jscoverage['nlf.js'][170] = 0;
_$jscoverage['nlf.js'][182] = 0;
_$jscoverage['nlf.js'][185] = 0;
_$jscoverage['nlf.js'][167] = 0;
_$jscoverage['nlf.js'][171] = 0;
_$jscoverage['nlf.js'][183] = 0;
_$jscoverage['nlf.js'][186] = 0;
_$jscoverage['nlf.js'][189] = 0;
_$jscoverage['nlf.js'][196] = 0;
_$jscoverage['nlf.js'][187] = 0;
_$jscoverage['nlf.js'][190] = 0;
_$jscoverage['nlf.js'][197] = 0;
_$jscoverage['nlf.js'][198] = 0;
_$jscoverage['nlf.js'][201] = 0;
_$jscoverage['nlf.js'][199] = 0;
_$jscoverage['nlf.js'][202] = 0;
_$jscoverage['nlf.js'][203] = 0;
_$jscoverage['nlf.js'][208] = 0;
_$jscoverage['nlf.js'][204] = 0;
_$jscoverage['nlf.js'][209] = 0;
_$jscoverage['nlf.js'][210] = 0;
_$jscoverage['nlf.js'][212] = 0;
_$jscoverage['nlf.js'][222] = 0;
_$jscoverage['nlf.js'][224] = 0;
_$jscoverage['nlf.js'][230] = 0;
_$jscoverage['nlf.js'][233] = 0;
_$jscoverage['nlf.js'][211] = 0;
_$jscoverage['nlf.js'][213] = 0;
_$jscoverage['nlf.js'][223] = 0;
_$jscoverage['nlf.js'][225] = 0;
_$jscoverage['nlf.js'][231] = 0;
_$jscoverage['nlf.js'][234] = 0;
_$jscoverage['nlf.js'][237] = 0;
_$jscoverage['nlf.js'][239] = 0;
_$jscoverage['nlf.js'][235] = 0;
_$jscoverage['nlf.js'][238] = 0;
_$jscoverage['nlf.js'][240] = 0;
_$jscoverage['nlf.js'][244] = 0;
_$jscoverage['nlf.js'][247] = 0;
_$jscoverage['nlf.js'][241] = 0;
_$jscoverage['nlf.js'][245] = 0;
_$jscoverage['nlf.js'][248] = 0;
_$jscoverage['nlf.js'][251] = 0;
_$jscoverage['nlf.js'][249] = 0;
_$jscoverage['nlf.js'][252] = 0;
_$jscoverage['nlf.js'][253] = 0;
_$jscoverage['nlf.js'][254] = 0;
_$jscoverage['nlf.js'][258] = 0;
_$jscoverage['nlf.js'][259] = 0;
_$jscoverage['nlf.js'][255] = 0;
_$jscoverage['nlf.js'][256] = 0;
_$jscoverage['nlf.js'][261] = 0;
_$jscoverage['nlf.js'][262] = 0;
_$jscoverage['nlf.js'][275] = 0;
_$jscoverage['nlf.js'][277] = 0;
_$jscoverage['nlf.js'][280] = 0;
_$jscoverage['nlf.js'][281] = 0;
_$jscoverage['nlf.js'][282] = 0;
_$jscoverage['nlf.js'][286] = 0;
_$jscoverage['nlf.js'][295] = 0;
_$jscoverage['nlf.js'][297] = 0;
_$jscoverage['nlf.js'][299] = 0;
_$jscoverage['nlf.js'][300] = 0;
_$jscoverage['nlf.js'][303] = 0;
_$jscoverage['nlf.js'][304] = 0;
_$jscoverage['nlf.js'][306] = 0;
_$jscoverage['nlf.js'][266] = 0;
_$jscoverage['nlf.js'][267] = 0;
_$jscoverage['nlf.js'][268] = 0;
_$jscoverage['nlf.js'][274] = 0;
_$jscoverage['nlf.js'][287] = 0;
_$jscoverage['nlf.js'][289] = 0;
_$jscoverage['nlf.js'][292] = 0;
_$jscoverage['nlf.js'][293] = 0;
_$jscoverage['nlf.js'][294] = 0;
_$jscoverage['nlf.js'][298] = 0;
_$jscoverage['nlf.js'][307] = 0;
_$jscoverage['nlf.js'][310] = 0;
_$jscoverage['nlf.js'][309] = 0;
_$jscoverage['nlf.js'][311] = 0;
_$jscoverage['nlf.js'][314] = 0;
_$jscoverage['nlf.js'][312] = 0;
_$jscoverage['nlf.js'][315] = 0;
_$jscoverage['nlf.js'][316] = 0;
_$jscoverage['nlf.js'][318] = 0;
_$jscoverage['nlf.js'][319] = 0;
_$jscoverage['nlf.js'][322] = 0;
_$jscoverage['nlf.js'][323] = 0;
_$jscoverage['nlf.js'][326] = 0;
_$jscoverage['nlf.js'][327] = 0;
_$jscoverage['nlf.js'][329] = 0;
_$jscoverage['nlf.js'][336] = 0;
_$jscoverage['nlf.js'][337] = 0;
_$jscoverage['nlf.js'][338] = 0;
_$jscoverage['nlf.js'][339] = 0;
_$jscoverage['nlf.js'][340] = 0;
_$jscoverage['nlf.js'][342] = 0;
_$jscoverage['nlf.js'][344] = 0;
_$jscoverage['nlf.js'][343] = 0;
_$jscoverage['nlf.js'][345] = 0;
_$jscoverage['nlf.js'][346] = 0;
_$jscoverage['nlf.js'][350] = 0;
_$jscoverage['nlf.js'][352] = 0;
_$jscoverage['nlf.js'][353] = 0;
_$jscoverage['nlf.js'][357] = 0;
_$jscoverage['nlf.js'][362] = 0;
_$jscoverage['nlf.js'][355] = 0;
_$jscoverage['nlf.js'][358] = 0;
_$jscoverage['nlf.js'][359] = 0;
_$jscoverage['nlf.js'][360] = 0;
_$jscoverage['nlf.js'][363] = 0;
_$jscoverage['nlf.js'][364] = 0;
_$jscoverage['nlf.js'][366] = 0;
_$jscoverage['nlf.js'][374] = 0;
_$jscoverage['nlf.js'][375] = 0;
_$jscoverage['nlf.js'][379] = 0;
_$jscoverage['nlf.js'][380] = 0;
_$jscoverage['nlf.js'][384] = 0;
_$jscoverage['nlf.js'][386] = 0;
_$jscoverage['nlf.js'][387] = 0;
_$jscoverage['nlf.js'][388] = 0;
_$jscoverage['nlf.js'][392] = 0;
_$jscoverage['nlf.js'][394] = 0;
_$jscoverage['nlf.js'][395] = 0;
_$jscoverage['nlf.js'][399] = 0;
_$jscoverage['nlf.js'][404] = 0;
}

@@ -120,19 +136,19 @@ _$jscoverage['nlf.js'][11]++;

_$jscoverage['nlf.js'][13]++;
var readInstalled = require("read-installed"), Module = require("./module"), path = require("path"), glob = require("glob"), FileSource = require("./file-source"), PackageSource = require("./package-source"), csvFormatter = require("./formatters/csv"), standardFormatter = require("./formatters/standard"), LicenseCollection = require("./license-collection"), licenseFind = require("./license-find"), matchNodeModules = /node_modules\//;
_$jscoverage['nlf.js'][31]++;
var readInstalled = require("read-installed"), Module = require("./module"), path = require("path"), fs = require("fs"), glob = require("glob"), FileSource = require("./file-source"), PackageSource = require("./package-source"), csvFormatter = require("./formatters/csv"), standardFormatter = require("./formatters/standard"), LicenseCollection = require("./license-collection"), licenseFind = require("./license-find"), matchNodeModules = /node_modules\//;
_$jscoverage['nlf.js'][32]++;
function isDevDependency(moduleData) {
_$jscoverage['nlf.js'][34]++;
_$jscoverage['nlf.js'][35]++;
if (moduleData.parent === undefined) {
_$jscoverage['nlf.js'][35]++;
_$jscoverage['nlf.js'][36]++;
return false;
}
_$jscoverage['nlf.js'][38]++;
_$jscoverage['nlf.js'][39]++;
var dependencies = moduleData.parent.devDependencies || {}, dependencyName;
_$jscoverage['nlf.js'][43]++;
_$jscoverage['nlf.js'][44]++;
for (dependencyName in dependencies) {
_$jscoverage['nlf.js'][44]++;
_$jscoverage['nlf.js'][45]++;
if (dependencies.hasOwnProperty(dependencyName)) {
_$jscoverage['nlf.js'][45]++;
_$jscoverage['nlf.js'][46]++;
if (dependencyName === moduleData.name) {
_$jscoverage['nlf.js'][46]++;
_$jscoverage['nlf.js'][47]++;
return true;

@@ -142,48 +158,48 @@ }

}
_$jscoverage['nlf.js'][51]++;
_$jscoverage['nlf.js'][52]++;
return false;
}
_$jscoverage['nlf.js'][62]++;
_$jscoverage['nlf.js'][63]++;
function parseInstalled(data, options, callback) {
_$jscoverage['nlf.js'][65]++;
_$jscoverage['nlf.js'][66]++;
var count = 0;
_$jscoverage['nlf.js'][74]++;
_$jscoverage['nlf.js'][75]++;
(function parseModuleData(moduleData, output) {
_$jscoverage['nlf.js'][78]++;
_$jscoverage['nlf.js'][79]++;
if (options.production && isDevDependency(moduleData)) {
_$jscoverage['nlf.js'][79]++;
_$jscoverage['nlf.js'][80]++;
return;
}
_$jscoverage['nlf.js'][84]++;
_$jscoverage['nlf.js'][85]++;
if (! output.hasOwnProperty(moduleData._id)) {
_$jscoverage['nlf.js'][87]++;
_$jscoverage['nlf.js'][88]++;
output[moduleData._id] = null;
_$jscoverage['nlf.js'][90]++;
_$jscoverage['nlf.js'][91]++;
count++;
_$jscoverage['nlf.js'][91]++;
_$jscoverage['nlf.js'][92]++;
createModule(moduleData, (function (err, module) {
_$jscoverage['nlf.js'][93]++;
_$jscoverage['nlf.js'][94]++;
count--;
_$jscoverage['nlf.js'][95]++;
_$jscoverage['nlf.js'][96]++;
if (err) {
_$jscoverage['nlf.js'][96]++;
_$jscoverage['nlf.js'][97]++;
return callback(err);
}
_$jscoverage['nlf.js'][100]++;
_$jscoverage['nlf.js'][101]++;
output[moduleData._id] = module;
_$jscoverage['nlf.js'][103]++;
_$jscoverage['nlf.js'][104]++;
var dependencies = moduleData.dependencies || {}, name;
_$jscoverage['nlf.js'][106]++;
_$jscoverage['nlf.js'][107]++;
for (name in dependencies) {
_$jscoverage['nlf.js'][107]++;
_$jscoverage['nlf.js'][108]++;
if (dependencies.hasOwnProperty(name)) {
_$jscoverage['nlf.js'][108]++;
_$jscoverage['nlf.js'][109]++;
if (typeof dependencies[name] === "object") {
_$jscoverage['nlf.js'][111]++;
_$jscoverage['nlf.js'][112]++;
parseModuleData(dependencies[name], output);
}
else {
_$jscoverage['nlf.js'][116]++;
_$jscoverage['nlf.js'][117]++;
console.warn("Warning: dependency \"" + name + "\" probably not installed.");
_$jscoverage['nlf.js'][118]++;
_$jscoverage['nlf.js'][119]++;
console.warn("please install dependencies from npm before running nlf");

@@ -193,5 +209,5 @@ }

}
_$jscoverage['nlf.js'][124]++;
_$jscoverage['nlf.js'][125]++;
if (count === 0) {
_$jscoverage['nlf.js'][125]++;
_$jscoverage['nlf.js'][126]++;
callback(null, output);

@@ -203,109 +219,119 @@ }

}
_$jscoverage['nlf.js'][140]++;
_$jscoverage['nlf.js'][141]++;
function findPotentialLicenseFiles(directory, pattern, callback) {
_$jscoverage['nlf.js'][142]++;
_$jscoverage['nlf.js'][143]++;
if (typeof pattern !== "string") {
_$jscoverage['nlf.js'][143]++;
_$jscoverage['nlf.js'][144]++;
return callback(new Error("pattern must be a string"));
}
_$jscoverage['nlf.js'][146]++;
_$jscoverage['nlf.js'][147]++;
if (typeof directory !== "string") {
_$jscoverage['nlf.js'][147]++;
_$jscoverage['nlf.js'][148]++;
return callback(new Error("directory must be a string"));
}
_$jscoverage['nlf.js'][151]++;
_$jscoverage['nlf.js'][152]++;
glob(pattern, {nocase: true, cwd: directory}, (function (err, files) {
_$jscoverage['nlf.js'][153]++;
_$jscoverage['nlf.js'][154]++;
if (err) {
_$jscoverage['nlf.js'][154]++;
_$jscoverage['nlf.js'][155]++;
return callback(err);
}
_$jscoverage['nlf.js'][157]++;
_$jscoverage['nlf.js'][158]++;
var fileIndex, matchedFile, found = [];
_$jscoverage['nlf.js'][161]++;
_$jscoverage['nlf.js'][162]++;
for (fileIndex = files.length - 1; fileIndex >= 0; fileIndex--) {
_$jscoverage['nlf.js'][162]++;
_$jscoverage['nlf.js'][163]++;
matchedFile = files[fileIndex];
_$jscoverage['nlf.js'][165]++;
_$jscoverage['nlf.js'][166]++;
if (! matchNodeModules.test(matchedFile)) {
_$jscoverage['nlf.js'][166]++;
_$jscoverage['nlf.js'][167]++;
found.push(path.join(directory, matchedFile));
}
}
_$jscoverage['nlf.js'][170]++;
_$jscoverage['nlf.js'][171]++;
callback(null, found);
}));
}
_$jscoverage['nlf.js'][182]++;
_$jscoverage['nlf.js'][183]++;
function addFiles(filePaths, collection, callback) {
_$jscoverage['nlf.js'][185]++;
_$jscoverage['nlf.js'][186]++;
if (! filePaths || filePaths.length === 0) {
_$jscoverage['nlf.js'][186]++;
_$jscoverage['nlf.js'][187]++;
return callback(null);
}
_$jscoverage['nlf.js'][189]++;
_$jscoverage['nlf.js'][190]++;
var fileIndex, pending = filePaths.length, source;
_$jscoverage['nlf.js'][196]++;
_$jscoverage['nlf.js'][197]++;
function checkDone(err) {
_$jscoverage['nlf.js'][197]++;
_$jscoverage['nlf.js'][198]++;
if (err) {
_$jscoverage['nlf.js'][198]++;
_$jscoverage['nlf.js'][199]++;
callback(err);
}
_$jscoverage['nlf.js'][201]++;
_$jscoverage['nlf.js'][202]++;
pending--;
_$jscoverage['nlf.js'][202]++;
_$jscoverage['nlf.js'][203]++;
if (! pending) {
_$jscoverage['nlf.js'][203]++;
_$jscoverage['nlf.js'][204]++;
callback(null);
}
}
_$jscoverage['nlf.js'][208]++;
_$jscoverage['nlf.js'][209]++;
for (fileIndex = 0; fileIndex < filePaths.length; fileIndex++) {
_$jscoverage['nlf.js'][209]++;
_$jscoverage['nlf.js'][210]++;
source = new FileSource(filePaths[fileIndex]);
_$jscoverage['nlf.js'][210]++;
_$jscoverage['nlf.js'][211]++;
collection.add(source);
_$jscoverage['nlf.js'][212]++;
_$jscoverage['nlf.js'][213]++;
source.read(checkDone);
}
}
_$jscoverage['nlf.js'][222]++;
_$jscoverage['nlf.js'][223]++;
function createModule(moduleData, callback) {
_$jscoverage['nlf.js'][224]++;
_$jscoverage['nlf.js'][225]++;
var repository = (moduleData.repository || {}).url || "(none)", directory = moduleData.path, module = new Module(moduleData._id, moduleData.name, moduleData.version, directory, repository);
_$jscoverage['nlf.js'][230]++;
_$jscoverage['nlf.js'][231]++;
findPotentialLicenseFiles(directory, "**/*license*", (function (err, licenseFiles) {
_$jscoverage['nlf.js'][233]++;
_$jscoverage['nlf.js'][234]++;
if (err) {
_$jscoverage['nlf.js'][234]++;
_$jscoverage['nlf.js'][235]++;
return callback(err);
}
_$jscoverage['nlf.js'][237]++;
_$jscoverage['nlf.js'][238]++;
addFiles(licenseFiles, module.licenseSources.license, (function (err) {
_$jscoverage['nlf.js'][239]++;
_$jscoverage['nlf.js'][240]++;
if (err) {
_$jscoverage['nlf.js'][240]++;
_$jscoverage['nlf.js'][241]++;
return callback(err);
}
_$jscoverage['nlf.js'][244]++;
_$jscoverage['nlf.js'][245]++;
findPotentialLicenseFiles(directory, "**/*readme*", (function (err, readmeFiles) {
_$jscoverage['nlf.js'][247]++;
_$jscoverage['nlf.js'][248]++;
if (err) {
_$jscoverage['nlf.js'][248]++;
_$jscoverage['nlf.js'][249]++;
return callback(err);
}
_$jscoverage['nlf.js'][251]++;
_$jscoverage['nlf.js'][252]++;
addFiles(readmeFiles, module.licenseSources.readme, (function (err) {
_$jscoverage['nlf.js'][253]++;
var index;
_$jscoverage['nlf.js'][255]++;
if (err) {
_$jscoverage['nlf.js'][254]++;
_$jscoverage['nlf.js'][256]++;
return callback(err);
}
_$jscoverage['nlf.js'][258]++;
_$jscoverage['nlf.js'][261]++;
if (moduleData.license) {
_$jscoverage['nlf.js'][259]++;
_$jscoverage['nlf.js'][262]++;
module.licenseSources["package"].add(new PackageSource(moduleData.license));
}
_$jscoverage['nlf.js'][262]++;
_$jscoverage['nlf.js'][266]++;
if (moduleData.licenses) {
_$jscoverage['nlf.js'][267]++;
for (index = 0; index < moduleData.licenses.length; index++) {
_$jscoverage['nlf.js'][268]++;
module.licenseSources["package"].add(new PackageSource(moduleData.licenses[index]));
}
}
_$jscoverage['nlf.js'][274]++;
callback(null, module);

@@ -317,74 +343,107 @@ }));

}
_$jscoverage['nlf.js'][275]++;
_$jscoverage['nlf.js'][287]++;
function convertToArray(object) {
_$jscoverage['nlf.js'][277]++;
_$jscoverage['nlf.js'][289]++;
var propertyName, output = [];
_$jscoverage['nlf.js'][280]++;
_$jscoverage['nlf.js'][292]++;
for (propertyName in object) {
_$jscoverage['nlf.js'][281]++;
_$jscoverage['nlf.js'][293]++;
if (object.hasOwnProperty(propertyName)) {
_$jscoverage['nlf.js'][282]++;
_$jscoverage['nlf.js'][294]++;
output.push(object[propertyName]);
}
}
_$jscoverage['nlf.js'][286]++;
_$jscoverage['nlf.js'][298]++;
return output;
}
_$jscoverage['nlf.js'][295]++;
_$jscoverage['nlf.js'][307]++;
function processOptions(options) {
_$jscoverage['nlf.js'][297]++;
_$jscoverage['nlf.js'][309]++;
options = options || {};
_$jscoverage['nlf.js'][299]++;
_$jscoverage['nlf.js'][311]++;
if (typeof options !== "object") {
_$jscoverage['nlf.js'][300]++;
_$jscoverage['nlf.js'][312]++;
throw new Error("options must be an object");
}
_$jscoverage['nlf.js'][303]++;
_$jscoverage['nlf.js'][315]++;
options.directory = options.directory || process.cwd();
_$jscoverage['nlf.js'][304]++;
_$jscoverage['nlf.js'][316]++;
options.production = options.production || false;
_$jscoverage['nlf.js'][306]++;
_$jscoverage['nlf.js'][318]++;
if (typeof options.directory !== "string") {
_$jscoverage['nlf.js'][307]++;
_$jscoverage['nlf.js'][319]++;
throw new Error("options.directory must be a string");
}
_$jscoverage['nlf.js'][310]++;
_$jscoverage['nlf.js'][322]++;
if (typeof options.production !== "boolean") {
_$jscoverage['nlf.js'][311]++;
_$jscoverage['nlf.js'][323]++;
throw new Error("options.production must be a boolean");
}
_$jscoverage['nlf.js'][314]++;
_$jscoverage['nlf.js'][326]++;
return options;
}
_$jscoverage['nlf.js'][323]++;
_$jscoverage['nlf.js'][336]++;
function fileExistsSync(filePath) {
_$jscoverage['nlf.js'][338]++;
try {
_$jscoverage['nlf.js'][339]++;
var stats = fs.statSync(filePath);
_$jscoverage['nlf.js'][340]++;
return stats.isFile();
}
catch (err) {
_$jscoverage['nlf.js'][342]++;
if (err.code === "ENOENT") {
_$jscoverage['nlf.js'][343]++;
return false;
}
_$jscoverage['nlf.js'][345]++;
throw err;
}
}
_$jscoverage['nlf.js'][355]++;
function find(options, callback) {
_$jscoverage['nlf.js'][326]++;
if (typeof options === "function" && typeof callback === undefined) {
_$jscoverage['nlf.js'][327]++;
_$jscoverage['nlf.js'][358]++;
if (typeof options === "function" && callback === undefined) {
_$jscoverage['nlf.js'][359]++;
callback = options;
_$jscoverage['nlf.js'][360]++;
options = undefined;
}
_$jscoverage['nlf.js'][329]++;
options = processOptions(options);
_$jscoverage['nlf.js'][336]++;
_$jscoverage['nlf.js'][363]++;
try {
_$jscoverage['nlf.js'][364]++;
options = processOptions(options);
}
catch (err) {
_$jscoverage['nlf.js'][366]++;
return callback(err);
}
_$jscoverage['nlf.js'][374]++;
function log(output) {
_$jscoverage['nlf.js'][337]++;
_$jscoverage['nlf.js'][375]++;
console.error("Error in reading node_module dependencies, error was: " + output);
}
_$jscoverage['nlf.js'][342]++;
_$jscoverage['nlf.js'][379]++;
if (! fileExistsSync(path.join(options.directory, "package.json"))) {
_$jscoverage['nlf.js'][380]++;
return callback(new Error("No package.json file found."));
}
_$jscoverage['nlf.js'][384]++;
readInstalled(options.directory, null, log, (function (err, data) {
_$jscoverage['nlf.js'][344]++;
_$jscoverage['nlf.js'][386]++;
if (err) {
_$jscoverage['nlf.js'][345]++;
_$jscoverage['nlf.js'][387]++;
console.error("Serious problem reading node_module dependencies");
_$jscoverage['nlf.js'][346]++;
_$jscoverage['nlf.js'][388]++;
return callback(err);
}
_$jscoverage['nlf.js'][350]++;
_$jscoverage['nlf.js'][392]++;
parseInstalled(data, options, (function (err, output) {
_$jscoverage['nlf.js'][352]++;
_$jscoverage['nlf.js'][394]++;
if (err) {
_$jscoverage['nlf.js'][353]++;
_$jscoverage['nlf.js'][395]++;
return callback(err);
}
_$jscoverage['nlf.js'][357]++;
_$jscoverage['nlf.js'][399]++;
callback(null, convertToArray(output));

@@ -394,4 +453,4 @@ }));

}
_$jscoverage['nlf.js'][362]++;
_$jscoverage['nlf.js'][404]++;
module.exports = {"find": find, "Module": Module, "FileSource": FileSource, "PackageSource": PackageSource, "csvFormatter": csvFormatter, "standardFormatter": standardFormatter, "licenseFind": licenseFind, "LicenseCollection": LicenseCollection};
_$jscoverage['nlf.js'].source = ["/**"," *"," * @description Performs license search"," *"," * @author Ian Kelly"," * @copyright Copyright (C) Ian Kelly 2013"," *"," * @license [url] The MIT License"," *"," */","'use strict';","","var readInstalled = require('read-installed'),","\tModule = require('./module'),","\tpath = require('path'),","\tglob = require('glob'),","\tFileSource = require('./file-source'),","\tPackageSource = require('./package-source'),","\tcsvFormatter = require('./formatters/csv'),","\tstandardFormatter = require('./formatters/standard'),","\tLicenseCollection = require('./license-collection'),","\tlicenseFind = require('./license-find'),","\tmatchNodeModules = /node_modules\\//;","","/**"," * Is this module a development dependency of its parent?"," * "," * @param {Object} moduleData The module's data"," * @return {Boolean} True if the module is a production dependency"," */","function isDevDependency(moduleData) {","","\t// this might be the root object - which by definition is production","\tif (moduleData.parent === undefined) {","\t\treturn false;","\t}","","\tvar dependencies = moduleData.parent.devDependencies || {},","\t\tdependencyName;","","\t// look for this module in the production dependencies of the parent","\t// and return true if it is found","\tfor (dependencyName in dependencies) {","\t\tif (dependencies.hasOwnProperty(dependencyName)) {","\t\t\tif (dependencyName === moduleData.name) {","\t\t\t\treturn true;","\t\t\t}","\t\t}","\t}","","\treturn false;","}","","/**"," * Parse the data returned by readInstalled"," *"," * @param {Object}\t\tdata readInstalled data"," * @param {Object}\t\toptions the options object"," * @param {Array}\t\toutput The output array"," * @param {Function}\tcallback Callback function"," */","function parseInstalled(data, options, callback) {","","\t// count of outstanding unfinished parse functions","\tvar count = 0;","","\t/**","\t * Recursively parse some readInstalled module data, including all dependencies","\t *","\t * @param {Object}\t\tmoduleData\tThe module data","\t * @param {Object}\t\toutput\t\tThe output data","\t * @param {Function}\tcallback\tCallback","\t */","\t(function parseModuleData(moduleData, output) {","","\t\t// don't parse this module if it is a development dependency","\t\t// and we are only looking for production dependencies","\t\tif (options.production &amp;&amp; isDevDependency(moduleData)) {","\t\t\treturn;","\t\t}","","\t\t// a module with this ID (name@version) is already in the output","\t\t// collection, we don't need to process it again","\t\tif (!output.hasOwnProperty(moduleData._id)) {","","\t\t\t// we need to lock this ID now in case another function call does this","\t\t\toutput[moduleData._id] = null;","","\t\t\t// we're going to call the async function - so increase count","\t\t\tcount++;","\t\t\tcreateModule(moduleData, function (err, module) {","\t\t\t\t// decrease count when it returns","\t\t\t\tcount--;","","\t\t\t\tif (err) {","\t\t\t\t\treturn callback(err);","\t\t\t\t}","","\t\t\t\t// add this module to the output object/collection","\t\t\t\toutput[moduleData._id] = module;","","\t\t\t\t// iterate over all the dependencies - if any","\t\t\t\tvar dependencies = moduleData.dependencies || {},","\t\t\t\t\tname;","","\t\t\t\tfor (name in dependencies) {","\t\t\t\t\tif (dependencies.hasOwnProperty(name)) {","\t\t\t\t\t\tif (typeof dependencies[name] === 'object') {","\t\t\t\t\t\t\t// this is the normal case where a dependency is an object","\t\t\t\t\t\t\t// recursively parse that object","\t\t\t\t\t\t\tparseModuleData(dependencies[name], output);","\t\t\t\t\t\t} else {","\t\t\t\t\t\t\t// if a module is in the project package.json file but","\t\t\t\t\t\t\t// has not yet been npm installed, it will just be a string and","\t\t\t\t\t\t\t// no futher detail should be","\t\t\t\t\t\t\tconsole.warn('Warning: dependency \"' + name +","\t\t\t\t\t\t\t\t'\" probably not installed.');","\t\t\t\t\t\t\tconsole.warn('please install dependencies from npm before running nlf');","\t\t\t\t\t\t}","\t\t\t\t\t}","\t\t\t\t}","","\t\t\t\t// if count falls to zero, we are finished","\t\t\t\tif (count === 0) {","\t\t\t\t\tcallback(null, output);","\t\t\t\t}","\t\t\t});","\t\t}","","\t})(data, {});","}","","/**"," * Find potential license files - using glob matching"," *"," * @param {String} directory The directory to search in"," * @param {String} pattern The glob pattern to apply"," * @param {Function} callback Callback (err, arrayOfPaths)"," */","function findPotentialLicenseFiles(directory, pattern, callback) {","","\tif (typeof pattern !== 'string') {","\t\treturn callback(new Error('pattern must be a string'));","\t}","","\tif (typeof directory !== 'string') {","\t\treturn callback(new Error('directory must be a string'));","\t}","","\t// glob to find all files that match the pattern","\tglob(pattern, { nocase: true, cwd: directory }, function (err, files) {","","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\tvar fileIndex,","\t\t\tmatchedFile,","\t\t\tfound = [];","","\t\tfor (fileIndex = files.length - 1; fileIndex &gt;= 0; fileIndex--) {","\t\t\tmatchedFile = files[fileIndex];","","\t\t\t// exclude files found in node_modules directories","\t\t\tif (!matchNodeModules.test(matchedFile)) {","\t\t\t\tfound.push(path.join(directory, matchedFile));","\t\t\t}","\t\t}","","\t\tcallback(null, found);","\t});","}","","","/**"," * Add files to a module's collection"," * "," * @param {Array} filePaths Array of file paths"," * @param {Array } collection The collection to add the fileSource objects to"," * @param {Function} callback Callback (err);"," */","function addFiles(filePaths, collection, callback) {","","\t// if this is called with a missing or empty list - just callbacj","\tif (!filePaths || filePaths.length === 0) {","\t\treturn callback(null);","\t}","","\tvar fileIndex,","\t\tpending = filePaths.length,","\t\tsource;","","\t/**","\t * Check whether we have completed the list","\t */","\tfunction checkDone(err) {","\t\tif (err) {","\t\t\tcallback(err);","\t\t}","","\t\tpending--;","\t\tif (!pending) {","\t\t\tcallback(null);","\t\t}","\t}","","\t// iterate over all the file paths","\tfor (fileIndex = 0; fileIndex &lt; filePaths.length; fileIndex++) {","\t\tsource = new FileSource(filePaths[fileIndex]);","\t\tcollection.add(source);","\t\t// read the files","\t\tsource.read(checkDone);","\t}","}","","/**"," * Create a module object from a record in readInstalled"," *"," * @param {Object} moduleData The module data object"," * @param {Function} callback Callback (err, Array of module object)"," */","function createModule(moduleData, callback) {","","\tvar repository = (moduleData.repository || {}).url || '(none)',","\t\tdirectory = moduleData.path,","\t\tmodule = new Module(moduleData._id, moduleData.name,","\t\t\tmoduleData.version, directory, repository);","","\t// glob for license files","\tfindPotentialLicenseFiles(directory, '**/*license*',","\t\tfunction (err, licenseFiles) {","","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\taddFiles(licenseFiles, module.licenseSources.license, function (err) {","","\t\t\tif (err) {","\t\t\t\treturn callback(err);","\t\t\t}","","\t\t\t// glob for readme files","\t\t\tfindPotentialLicenseFiles(directory, '**/*readme*',","\t\t\t\tfunction (err, readmeFiles) {","","\t\t\t\tif (err) {","\t\t\t\t\treturn callback(err);","\t\t\t\t}","","\t\t\t\taddFiles(readmeFiles, module.licenseSources.readme, function (err) {","","\t\t\t\t\tif (err) {","\t\t\t\t\t\treturn callback(err);","\t\t\t\t\t}","","\t\t\t\t\t// finally, if there is data in package.json relating to licenses","\t\t\t\t\tif (moduleData.license) {","\t\t\t\t\t\tmodule.licenseSources.package.add(new PackageSource(moduleData.license));","\t\t\t\t\t}","","\t\t\t\t\tcallback(null, module);","\t\t\t\t});","\t\t\t});","\t\t});","\t});","}","","/**"," * Convert an object to an array"," * "," * @param {Object} object The object"," * @return {Array} An array made from each property of the object"," */","function convertToArray(object) {","","\tvar propertyName,","\t\toutput = [];","","\tfor (propertyName in object) {","\t\tif (object.hasOwnProperty(propertyName)) {","\t\t\toutput.push(object[propertyName]);","\t\t}","\t}","","\treturn output;","}","","/**"," * Process the options"," * "," * @param {Object} options The options object passed into find()"," * @return {Object} Options that have been massaged"," */","function processOptions(options) {","","\toptions = options || {};","","\tif (typeof options !== 'object') {","\t\tthrow new Error('options must be an object');","\t}","","\toptions.directory = options.directory || process.cwd();","\toptions.production = options.production || false;","","\tif (typeof options.directory !== 'string') {","\t\tthrow new Error('options.directory must be a string');","\t}","","\tif (typeof options.production !== 'boolean') {","\t\tthrow new Error('options.production must be a boolean');","\t}","","\treturn options;","}","","/**"," * Function to find licenses"," *"," * @param {Object} options Options object"," * @param {Function} callback Callback function"," */","function find(options, callback) {","","\t// process arguments","\tif (typeof options === 'function' &amp;&amp; typeof callback === undefined) {","\t\tcallback = options;","\t}","\toptions = processOptions(options);","","\t/**","\t * Function called when readInstalled hits an issue","\t *","\t * @param {String} output The error message","\t */","\tfunction log(output) {","\t\tconsole.error('Error in reading node_module dependencies, error was: '","\t\t\t+ output);","\t}","","\t// use npm read-installed module to search out all the node modules","\treadInstalled(options.directory, null, log, function (err, data) {","","\t\tif (err) {","\t\t\tconsole.error('Serious problem reading node_module dependencies');","\t\t\treturn callback(err);","\t\t}","","\t\t// parse the read-installed data","\t\tparseInstalled(data, options, function (err, output) {","","\t\t\tif (err) {","\t\t\t\treturn callback(err);","\t\t\t}","","\t\t\t// return the output","\t\t\tcallback(null, convertToArray(output));","\t\t});","\t});","}","","module.exports = {","\t'find': find,","\t'Module': Module,","\t'FileSource': FileSource,","\t'PackageSource': PackageSource,","\t'csvFormatter': csvFormatter,","\t'standardFormatter': standardFormatter,","\t'licenseFind': licenseFind,","\t'LicenseCollection': LicenseCollection","};"];
_$jscoverage['nlf.js'].source = ["/**"," *"," * @description Performs license search"," *"," * @author Ian Kelly"," * @copyright Copyright (C) Ian Kelly 2013"," *"," * @license [url] The MIT License"," *"," */","'use strict';","","var readInstalled = require('read-installed'),","\tModule = require('./module'),","\tpath = require('path'),","\tfs = require('fs'),","\tglob = require('glob'),","\tFileSource = require('./file-source'),","\tPackageSource = require('./package-source'),","\tcsvFormatter = require('./formatters/csv'),","\tstandardFormatter = require('./formatters/standard'),","\tLicenseCollection = require('./license-collection'),","\tlicenseFind = require('./license-find'),","\tmatchNodeModules = /node_modules\\//;","","/**"," * Is this module a development dependency of its parent?"," * "," * @param {Object} moduleData The module's data"," * @return {Boolean} True if the module is a production dependency"," */","function isDevDependency(moduleData) {","","\t// this might be the root object - which by definition is production","\tif (moduleData.parent === undefined) {","\t\treturn false;","\t}","","\tvar dependencies = moduleData.parent.devDependencies || {},","\t\tdependencyName;","","\t// look for this module in the production dependencies of the parent","\t// and return true if it is found","\tfor (dependencyName in dependencies) {","\t\tif (dependencies.hasOwnProperty(dependencyName)) {","\t\t\tif (dependencyName === moduleData.name) {","\t\t\t\treturn true;","\t\t\t}","\t\t}","\t}","","\treturn false;","}","","/**"," * Parse the data returned by readInstalled"," *"," * @param {Object}\t\tdata readInstalled data"," * @param {Object}\t\toptions the options object"," * @param {Array}\t\toutput The output array"," * @param {Function}\tcallback Callback function"," */","function parseInstalled(data, options, callback) {","","\t// count of outstanding unfinished parse functions","\tvar count = 0;","","\t/**","\t * Recursively parse some readInstalled module data, including all dependencies","\t *","\t * @param {Object}\t\tmoduleData\tThe module data","\t * @param {Object}\t\toutput\t\tThe output data","\t * @param {Function}\tcallback\tCallback","\t */","\t(function parseModuleData(moduleData, output) {","","\t\t// don't parse this module if it is a development dependency","\t\t// and we are only looking for production dependencies","\t\tif (options.production &amp;&amp; isDevDependency(moduleData)) {","\t\t\treturn;","\t\t}","","\t\t// a module with this ID (name@version) is already in the output","\t\t// collection, we don't need to process it again","\t\tif (!output.hasOwnProperty(moduleData._id)) {","","\t\t\t// we need to lock this ID now in case another function call does this","\t\t\toutput[moduleData._id] = null;","","\t\t\t// we're going to call the async function - so increase count","\t\t\tcount++;","\t\t\tcreateModule(moduleData, function (err, module) {","\t\t\t\t// decrease count when it returns","\t\t\t\tcount--;","","\t\t\t\tif (err) {","\t\t\t\t\treturn callback(err);","\t\t\t\t}","","\t\t\t\t// add this module to the output object/collection","\t\t\t\toutput[moduleData._id] = module;","","\t\t\t\t// iterate over all the dependencies - if any","\t\t\t\tvar dependencies = moduleData.dependencies || {},","\t\t\t\t\tname;","","\t\t\t\tfor (name in dependencies) {","\t\t\t\t\tif (dependencies.hasOwnProperty(name)) {","\t\t\t\t\t\tif (typeof dependencies[name] === 'object') {","\t\t\t\t\t\t\t// this is the normal case where a dependency is an object","\t\t\t\t\t\t\t// recursively parse that object","\t\t\t\t\t\t\tparseModuleData(dependencies[name], output);","\t\t\t\t\t\t} else {","\t\t\t\t\t\t\t// if a module is in the project package.json file but","\t\t\t\t\t\t\t// has not yet been npm installed, it will just be a string and","\t\t\t\t\t\t\t// no futher detail should be","\t\t\t\t\t\t\tconsole.warn('Warning: dependency \"' + name +","\t\t\t\t\t\t\t\t'\" probably not installed.');","\t\t\t\t\t\t\tconsole.warn('please install dependencies from npm before running nlf');","\t\t\t\t\t\t}","\t\t\t\t\t}","\t\t\t\t}","","\t\t\t\t// if count falls to zero, we are finished","\t\t\t\tif (count === 0) {","\t\t\t\t\tcallback(null, output);","\t\t\t\t}","\t\t\t});","\t\t}","","\t})(data, {});","}","","/**"," * Find potential license files - using glob matching"," *"," * @param {String} directory The directory to search in"," * @param {String} pattern The glob pattern to apply"," * @param {Function} callback Callback (err, arrayOfPaths)"," */","function findPotentialLicenseFiles(directory, pattern, callback) {","","\tif (typeof pattern !== 'string') {","\t\treturn callback(new Error('pattern must be a string'));","\t}","","\tif (typeof directory !== 'string') {","\t\treturn callback(new Error('directory must be a string'));","\t}","","\t// glob to find all files that match the pattern","\tglob(pattern, { nocase: true, cwd: directory }, function (err, files) {","","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\tvar fileIndex,","\t\t\tmatchedFile,","\t\t\tfound = [];","","\t\tfor (fileIndex = files.length - 1; fileIndex &gt;= 0; fileIndex--) {","\t\t\tmatchedFile = files[fileIndex];","","\t\t\t// exclude files found in node_modules directories","\t\t\tif (!matchNodeModules.test(matchedFile)) {","\t\t\t\tfound.push(path.join(directory, matchedFile));","\t\t\t}","\t\t}","","\t\tcallback(null, found);","\t});","}","","","/**"," * Add files to a module's collection"," * "," * @param {Array} filePaths Array of file paths"," * @param {Array } collection The collection to add the fileSource objects to"," * @param {Function} callback Callback (err);"," */","function addFiles(filePaths, collection, callback) {","","\t// if this is called with a missing or empty list - just callbacj","\tif (!filePaths || filePaths.length === 0) {","\t\treturn callback(null);","\t}","","\tvar fileIndex,","\t\tpending = filePaths.length,","\t\tsource;","","\t/**","\t * Check whether we have completed the list","\t */","\tfunction checkDone(err) {","\t\tif (err) {","\t\t\tcallback(err);","\t\t}","","\t\tpending--;","\t\tif (!pending) {","\t\t\tcallback(null);","\t\t}","\t}","","\t// iterate over all the file paths","\tfor (fileIndex = 0; fileIndex &lt; filePaths.length; fileIndex++) {","\t\tsource = new FileSource(filePaths[fileIndex]);","\t\tcollection.add(source);","\t\t// read the files","\t\tsource.read(checkDone);","\t}","}","","/**"," * Create a module object from a record in readInstalled"," *"," * @param {Object} moduleData The module data object"," * @param {Function} callback Callback (err, Array of module object)"," */","function createModule(moduleData, callback) {","","\tvar repository = (moduleData.repository || {}).url || '(none)',","\t\tdirectory = moduleData.path,","\t\tmodule = new Module(moduleData._id, moduleData.name,","\t\t\tmoduleData.version, directory, repository);","","\t// glob for license files","\tfindPotentialLicenseFiles(directory, '**/*license*',","\t\tfunction (err, licenseFiles) {","","\t\tif (err) {","\t\t\treturn callback(err);","\t\t}","","\t\taddFiles(licenseFiles, module.licenseSources.license, function (err) {","","\t\t\tif (err) {","\t\t\t\treturn callback(err);","\t\t\t}","","\t\t\t// glob for readme files","\t\t\tfindPotentialLicenseFiles(directory, '**/*readme*',","\t\t\t\tfunction (err, readmeFiles) {","","\t\t\t\tif (err) {","\t\t\t\t\treturn callback(err);","\t\t\t\t}","","\t\t\t\taddFiles(readmeFiles, module.licenseSources.readme, function (err) {","\t\t\t\t\tvar index;","","\t\t\t\t\tif (err) {","\t\t\t\t\t\treturn callback(err);","\t\t\t\t\t}","","\t\t\t\t\t// finally, if there is data in package.json relating to licenses","\t\t\t\t\t// simple license declarations first","\t\t\t\t\tif (moduleData.license) {","\t\t\t\t\t\tmodule.licenseSources.package.add(new PackageSource(moduleData.license));","\t\t\t\t\t}","","\t\t\t\t\t// more complex ones","\t\t\t\t\tif (moduleData.licenses) {","\t\t\t\t\t\tfor (index = 0; index &lt; moduleData.licenses.length; index++) {","\t\t\t\t\t\t\tmodule.licenseSources.package.add(","\t\t\t\t\t\t\t\tnew PackageSource(moduleData.licenses[index])","\t\t\t\t\t\t\t);","\t\t\t\t\t\t}","\t\t\t\t\t}","","\t\t\t\t\tcallback(null, module);","\t\t\t\t});","\t\t\t});","\t\t});","\t});","}","","/**"," * Convert an object to an array"," * "," * @param {Object} object The object"," * @return {Array} An array made from each property of the object"," */","function convertToArray(object) {","","\tvar propertyName,","\t\toutput = [];","","\tfor (propertyName in object) {","\t\tif (object.hasOwnProperty(propertyName)) {","\t\t\toutput.push(object[propertyName]);","\t\t}","\t}","","\treturn output;","}","","/**"," * Process the options"," * "," * @param {Object} options The options object passed into find()"," * @return {Object} Options that have been massaged"," */","function processOptions(options) {","","\toptions = options || {};","","\tif (typeof options !== 'object') {","\t\tthrow new Error('options must be an object');","\t}","","\toptions.directory = options.directory || process.cwd();","\toptions.production = options.production || false;","","\tif (typeof options.directory !== 'string') {","\t\tthrow new Error('options.directory must be a string');","\t}","","\tif (typeof options.production !== 'boolean') {","\t\tthrow new Error('options.production must be a boolean');","\t}","","\treturn options;","}","","","/**"," * Does a file exist?"," * "," * @param {String} filePath The path of the file"," * @return {Boolean} True if the file exists"," */","function fileExistsSync(filePath) {","","\ttry {","\t\tvar stats = fs.statSync(filePath);","\t\treturn stats.isFile();","\t} catch (err) {","\t\tif (err.code === 'ENOENT') {","\t\t\treturn false;","\t\t}","\t\tthrow err;","\t}","}","","/**"," * Function to find licenses"," *"," * @param {Object} options Options object"," * @param {Function} callback Callback function"," */","function find(options, callback) {","","\t// process arguments","\tif (typeof options === 'function' &amp;&amp; callback === undefined) {","\t\tcallback = options;","\t\toptions = undefined;","\t}","","\ttry {","\t\toptions = processOptions(options);","\t} catch (err) {","\t\treturn callback(err);","\t}","","\t/**","\t * Function called when readInstalled hits an issue","\t *","\t * @param {String} output The error message","\t */","\tfunction log(output) {","\t\tconsole.error('Error in reading node_module dependencies, error was: '","\t\t\t+ output);","\t}","","\tif (!fileExistsSync(path.join(options.directory, 'package.json'))) {","\t\treturn callback(new Error('No package.json file found.'));","\t}","","\t// use npm read-installed module to search out all the node modules","\treadInstalled(options.directory, null, log, function (err, data) {","","\t\tif (err) {","\t\t\tconsole.error('Serious problem reading node_module dependencies');","\t\t\treturn callback(err);","\t\t}","","\t\t// parse the read-installed data","\t\tparseInstalled(data, options, function (err, output) {","","\t\t\tif (err) {","\t\t\t\treturn callback(err);","\t\t\t}","","\t\t\t// return the output","\t\t\tcallback(null, convertToArray(output));","\t\t});","\t});","}","","module.exports = {","\t'find': find,","\t'Module': Module,","\t'FileSource': FileSource,","\t'PackageSource': PackageSource,","\t'csvFormatter': csvFormatter,","\t'standardFormatter': standardFormatter,","\t'licenseFind': licenseFind,","\t'LicenseCollection': LicenseCollection","};"];

@@ -19,3 +19,3 @@ /**

* @param {String} filePath Path of the file
* @returns {Object} The FileSource object
* @returns {Object} The FileSource object
*/

@@ -22,0 +22,0 @@ function FileSource(filePath) {

@@ -43,2 +43,6 @@ /**

if (typeof callback !== 'function') {
throw new Error('must have a callback');
}
if (!Array.isArray(licenseData)) {

@@ -52,6 +56,2 @@ return callback(new Error('licenseData must be an array'));

if (typeof callback !== 'function') {
return callback(new Error('must have a callback'));
}
var output = [];

@@ -58,0 +58,0 @@

@@ -57,2 +57,6 @@ /**

if (typeof callback !== 'function') {
throw new Error('must have a callback');
}
if (!Array.isArray(licenseData)) {

@@ -66,6 +70,2 @@ return callback(new Error('licenseData must be an array'));

if (typeof callback !== 'function') {
return callback(new Error('must have a callback'));
}
var output = [];

@@ -72,0 +72,0 @@

@@ -26,3 +26,3 @@ /**

/(?:^|\s)GPL\s/,
/(?:^|\s)GPLv2\s/
/(?:^|\s)GPLv\d\s/
]

@@ -58,5 +58,5 @@ },

'regex': [
/(?:^|\s)WTFPL\s/,
/(?:^|\s)DO\sWHAT\sTHE\sFUCK\sYOU\sWANT\sTO\sPUBLIC\sLICEN[CS]E\s/i
]
},

@@ -69,2 +69,10 @@ {

]
},
{
'name': 'Eclipse Public License',
'regex': [
/(?:^|\s)Eclipse\sPublic\sLicen[cs]e\s/i,
/(?:^|\s)EPL\s/,
/(?:(?:^|\s)|\()EPL-1\.0(?:\)|\s)/
]
}

@@ -87,3 +95,3 @@ ],

output = [];
// ignore files that have the ignore flag - e.g. the nfl project itself

@@ -90,0 +98,0 @@ if (!excludePattern.test(text)) {

@@ -358,7 +358,13 @@ /**

// process arguments
if (typeof options === 'function' && typeof callback === undefined) {
if (typeof options === 'function' && callback === undefined) {
callback = options;
options = undefined;
}
options = processOptions(options);
try {
options = processOptions(options);
} catch (err) {
return callback(err);
}
/**

@@ -365,0 +371,0 @@ * Function called when readInstalled hits an issue

@@ -1,2 +0,2 @@

all: test
all: lint test

@@ -14,2 +14,11 @@ test:

lint:
./node_modules/.bin/jshint \
--verbose \
index.js \
test/unit/formatters/*.js \
test/unit/*.js \
lib/*.js \
lib/formatters/*.js
.PHONY: all test test-cov

@@ -6,3 +6,3 @@ {

"author": "Ian Kelly <iandotkelly@gmail.com>",
"version": "0.2.5",
"version": "0.2.6",
"license": "MIT",

@@ -25,4 +25,4 @@ "bin" : {

"jshint": "~2.1.10",
"should": "~1.2.2",
"mocha": "~1.12.1",
"should": "~1.3.0",
"mocha": "~1.13.0",
"globs": "~0.1.1"

@@ -29,0 +29,0 @@ },

/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['sliding.js']) {
_$jscoverage['sliding.js'] = [];
_$jscoverage['sliding.js'][3] = 0;
_$jscoverage['sliding.js'][6] = 0;
_$jscoverage['sliding.js'][9] = 0;
_$jscoverage['sliding.js'][10] = 0;
_$jscoverage['sliding.js'][14] = 0;
_$jscoverage['sliding.js'][17] = 0;
_$jscoverage['sliding.js'][18] = 0;
_$jscoverage['sliding.js'][19] = 0;
_$jscoverage['sliding.js'][24] = 0;
_$jscoverage['sliding.js'][26] = 0;
_$jscoverage['sliding.js'][33] = 0;
}
_$jscoverage['sliding.js'][3]++;
"use strict";
_$jscoverage['sliding.js'][6]++;
function sliding(text, options, forEach, done) {
_$jscoverage['sliding.js'][9]++;
if (typeof text !== "string") {
_$jscoverage['sliding.js'][10]++;
throw new Error("text must be a stirng");
}
_$jscoverage['sliding.js'][14]++;
if (typeof options === "function" && typeof forEach === "function" && typeof done === undefined) {
_$jscoverage['sliding.js'][17]++;
done = fn;
_$jscoverage['sliding.js'][18]++;
forEach = options;
_$jscoverage['sliding.js'][19]++;
options = {step: 1};
}
_$jscoverage['sliding.js'][24]++;
if (typeof options !== "object") {
_$jscoverage['sliding.js'][26]++;
throw new Error("Unexpected parameters to sliding");
}
}
_$jscoverage['sliding.js'][33]++;
module.exports = sliding;
_$jscoverage['sliding.js'].source = ["","","'use strict';","","","function sliding(text, options, forEach, done) {","","\t// we must have text","\tif (typeof text !== 'string') {","\t\tthrow new Error('text must be a stirng');","\t}","","\t// options is optional","\tif (typeof options === 'function' &amp;&amp;","\t\ttypeof forEach === 'function' &amp;&amp;","\t\ttypeof done === undefined) {","\t\tdone = fn;","\t\tforEach = options;","\t\toptions = {","\t\t\tstep: 1","\t\t};","\t}","","\tif (typeof options !== 'object') {","\t\t// somethign strange happened","\t\tthrow new Error('Unexpected parameters to sliding');","\t}","","","","}","","module.exports = sliding;"];
'use strict';
function sliding(text, options, forEach, done) {
// we must have text
if (typeof text !== 'string') {
throw new Error('text must be a stirng');
}
// options is optional
if (typeof options === 'function' &&
typeof forEach === 'function' &&
typeof done === undefined) {
done = fn;
forEach = options;
options = {
step: 1
};
}
if (typeof options !== 'object') {
// somethign strange happened
throw new Error('Unexpected parameters to sliding');
}
}
module.exports = sliding;
{ name: 'nlf',
title: 'Node License Finder',
description: 'Find licenses for a node application and its node_module dependencies',
author: { name: 'Ian Kelly', email: 'iandotkelly@gmail.com' },
version: '0.2.3',
license: 'MIT',
bin: { nlf: './bin/nlf-cli.js' },
homepage: 'https://github.com/iandotkelly/nlf',
repository: { type: 'git', url: 'git://github.com/iandotkelly/nlf.git' },
dependencies:
{ commander:
{ name: 'commander',
version: '2.0.0',
description: 'the complete solution for node.js command-line programs',
keywords: [Object],
author: [Object],
repository: [Object],
devDependencies: [Object],
scripts: [Object],
main: 'index',
engines: [Object],
readme: '# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby\'s [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require(\'commander\');\n\nprogram\n .version(\'0.0.1\')\n .option(\'-p, --peppers\', \'Add peppers\')\n .option(\'-P, --pineapple\', \'Add pineapple\')\n .option(\'-b, --bbq\', \'Add bbq sauce\')\n .option(\'-c, --cheese [type]\', \'Add the specified type of cheese [marble]\', \'marble\')\n .parse(process.argv);\n\nconsole.log(\'you ordered a pizza with:\');\nif (program.peppers) console.log(\' - peppers\');\nif (program.pineapple) console.log(\' - pineapple\');\nif (program.bbq) console.log(\' - bbq\');\nconsole.log(\' - %s cheese\', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineapple\n -b, --bbq Add bbq sauce\n -c, --cheese <type> Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split(\'..\').map(Number);\n}\n\nfunction list(val) {\n return val.split(\',\');\n}\n\nprogram\n .version(\'0.0.1\')\n .usage(\'[options] <file ...>\')\n .option(\'-i, --integer <n>\', \'An integer argument\', parseInt)\n .option(\'-f, --float <n>\', \'A float argument\', parseFloat)\n .option(\'-r, --range <a>..<b>\', \'A range\', range)\n .option(\'-l, --list <items>\', \'A list\', list)\n .option(\'-o, --optional [value]\', \'An optional value\')\n .parse(process.argv);\n\nconsole.log(\' int: %j\', program.integer);\nconsole.log(\' float: %j\', program.float);\nconsole.log(\' optional: %j\', program.optional);\nprogram.range = program.range || [];\nconsole.log(\' range: %j..%j\', program.range[0], program.range[1]);\nconsole.log(\' list: %j\', program.list);\nconsole.log(\' args: %j\', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for "--help". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable "stuff" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require(\'../\');\n\nfunction list(val) {\n return val.split(\',\').map(Number);\n}\n\nprogram\n .version(\'0.0.1\')\n .option(\'-f, --foo\', \'enable some foo\')\n .option(\'-b, --bar\', \'enable some bar\')\n .option(\'-B, --baz\', \'enable some baz\');\n\n// must be before .parse() since\n// node\'s emit() is immediate\n\nprogram.on(\'--help\', function(){\n console.log(\' Examples:\');\n console.log(\'\');\n console.log(\' $ custom-help --help\');\n console.log(\' $ custom-help -h\');\n console.log(\'\');\n});\n\nprogram.parse(process.argv);\n\nconsole.log(\'stuff\');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .outputHelp()\n\n Output help information without exiting.\n\n## .help()\n\n Output help information and exit immediately.\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\'Software\'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \'AS IS\', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
readmeFilename: 'Readme.md',
bugs: [Object],
_id: 'commander@2.0.0',
_from: 'commander@~2.0.0',
realName: 'commander',
dependencies: {},
path: '/Users/ian/Projects/nlf/node_modules/commander',
realPath: '/Users/ian/Projects/nlf/node_modules/commander',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
'read-installed':
{ name: 'read-installed',
description: 'Read all the installed packages in a folder, and return a tree structure with all the data.',
version: '0.2.3',
repository: [Object],
main: 'read-installed.js',
scripts: [Object],
dependencies: [Object],
optionalDependencies: [Object],
author: [Object],
readme: '# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require("read-installed")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, logFunction, function (er, data) {\n ...\n})\n```\n',
readmeFilename: 'README.md',
bugs: [Object],
_id: 'read-installed@0.2.3',
dist: [Object],
_from: 'read-installed@~0.2.2',
_resolved: 'https://registry.npmjs.org/read-installed/-/read-installed-0.2.3.tgz',
realName: 'read-installed',
path: '/Users/ian/Projects/nlf/node_modules/read-installed',
realPath: '/Users/ian/Projects/nlf/node_modules/read-installed',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
glob:
{ author: [Object],
name: 'glob',
description: 'a little globber',
version: '3.2.6',
repository: [Object],
main: 'glob.js',
engines: [Object],
dependencies: [Object],
devDependencies: [Object],
scripts: [Object],
license: 'BSD',
readme: '# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there\'s an event emitter class, proper tests, and all the other\nthings you\'ve come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require("glob")\n\n// options is optional\nglob("**/*.js", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is ["**/*.js"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* "Globstar" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require("glob").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt\'s an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n "mounted" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don\'t sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See "Race Conditions" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], "\\\\*a\\\\?")` will return `"\\\\*a\\\\?"` rather than\n`"*a?"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n',
readmeFilename: 'README.md',
bugs: [Object],
_id: 'glob@3.2.6',
_from: 'glob@~3.2.1',
realName: 'glob',
path: '/Users/ian/Projects/nlf/node_modules/glob',
realPath: '/Users/ian/Projects/nlf/node_modules/glob',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {},
extraneous: false },
archy:
{ name: 'archy',
version: '0.0.2',
description: 'render nested hierarchies `npm ls` style with unicode pipes',
main: 'index.js',
directories: [Object],
devDependencies: [Object],
scripts: [Object],
repository: [Object],
keywords: [Object],
author: [Object],
license: 'MIT/X11',
engine: [Object],
readme: 'archy\n=====\n\nRender nested hierarchies `npm ls` style with unicode pipes.\n\n[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)\n\nexample\n=======\n\n``` js\nvar archy = require(\'archy\');\nvar s = archy({\n label : \'beep\',\n nodes : [\n \'ity\',\n {\n label : \'boop\',\n nodes : [\n {\n label : \'o_O\',\n nodes : [\n {\n label : \'oh\',\n nodes : [ \'hello\', \'puny\' ]\n },\n \'human\'\n ]\n },\n \'party\\ntime!\'\n ]\n }\n ]\n});\nconsole.log(s);\n```\n\noutput\n\n```\nbeep\n├── ity\n└─┬ boop\n ├─┬ o_O\n │ ├─┬ oh\n │ │ ├── hello\n │ │ └── puny\n │ └── human\n └── party\n time!\n```\n\nmethods\n=======\n\nvar archy = require(\'archy\')\n\narchy(obj, prefix=\'\', opts={})\n------------------------------\n\nReturn a string representation of `obj` with unicode pipe characters like how\n`npm ls` looks.\n\n`obj` should be a tree of nested objects with `\'label\'` and `\'nodes\'` fields.\n`\'label\'` is a string of text to display at a node level and `\'nodes\'` is an\narray of the descendents of the current node.\n\nIf a node is a string, that string will be used as the `\'label\'` and an empty\narray of `\'nodes\'` will be used.\n\n`prefix` gets prepended to all the lines and is used by the algorithm to\nrecursively update.\n\nIf `\'label\'` has newlines they will be indented at the present indentation level\nwith the current prefix.\n\nTo disable unicode results in favor of all-ansi output set `opts.unicode` to\n`false`.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install archy\n```\n\nlicense\n=======\n\nMIT/X11\n',
readmeFilename: 'README.markdown',
bugs: [Object],
_id: 'archy@0.0.2',
_from: 'archy@~0.0.2',
realName: 'archy',
dependencies: {},
path: '/Users/ian/Projects/nlf/node_modules/archy',
realPath: '/Users/ian/Projects/nlf/node_modules/archy',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
should:
{ name: 'should',
description: 'test framework agnostic BDD-style assertions',
version: '1.2.2',
author: [Object],
repository: [Object],
homepage: 'https://github.com/visionmedia/should.js',
contributors: [Object],
devDependencies: [Object],
keywords: [Object],
main: './lib/should.js',
engines: [Object],
readme: '_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n_should_ literally extends node\'s _assert_ module, in fact, it is node\'s assert module, for example `should.equal(str, \'foo\')` will work, just as `assert.equal(str, \'foo\')` would, and `should.AssertionError` **is** `assert.AssertionError`, meaning any test framework supporting this constructor will function properly with _should_.\n\n## Example\n```javascript\nvar user = {\n name: \'tj\'\n , pets: [\'tobi\', \'loki\', \'jane\', \'bandit\']\n};\n\nuser.should.have.property(\'name\', \'tj\');\nuser.should.have.property(\'pets\').with.lengthOf(4);\n\nsomeAsyncTask(foo, function(err, result){\n should.not.exist(err);\n should.exist(result);\n result.bar.should.equal(foo);\n});\n```\n## Installation\n\n $ npm install should\n\n## assert extras\n\nAs mentioned above, _should_ extends node\'s _assert_. The returned object from `require(\'should\')` is thus similar to the returned object from `require(\'assert\')`, but it has one extra convenience method:\n```javascript\nshould.exist(\'hello\')\nshould.exist([])\nshould.exist(null) // will throw\n```\nThis is equivalent to `should.ok`, which is equivalent to `assert.ok`, but reads a bit better. It gets better, though:\n```javascript\nshould.not.exist(false)\nshould.not.exist(\'\')\nshould.not.exist({}) // will throw\n```\nWe may add more _assert_ extras in the future... ;)\n\n## chaining assertions\n\nSome assertions can be chained, for example if a property is volatile we can first assert property existence:\n```javascript\nuser.should.have.property(\'pets\').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\nour dummy getters such as _and_ also help express chaining:\n```javascript\nuser.should.be.a(\'object\').and.have.property(\'name\', \'tj\')\n```\n## exist (static)\n\nThe returned object from `require(\'should\')` is the same object as `require(\'assert\')`. So you can use `should` just like `assert`:\n```javascript\nshould.fail(\'expected an error!\')\nshould.strictEqual(foo, bar)\n```\nIn general, using the Object prototype\'s _should_ is nicer than using these `assert` equivalents, because _should_ gives you access to the expressive and readable language described above:\n```javascript\nfoo.should.equal(bar) // same as should.strictEqual(foo, bar) above\n```\nThe only exception, though, is when you can\'t be sure that a particular object exists. In that case, attempting to access the _should_ property may throw a TypeError:\n```javascript\nfoo.should.equal(bar) // throws if foo is null or undefined!\n```\nFor this case, `require(\'should\')` extends `require(\'assert\')` with an extra convenience method to check whether an object exists:\n```javascript\nshould.exist({})\nshould.exist([])\nshould.exist(\'\')\nshould.exist(0)\nshould.exist(null) // will throw\nshould.exist(undefined) // will throw\n```\nYou can also check the negation:\n```javascript\nshould.not.exist(undefined)\nshould.not.exist(null)\nshould.not.exist(\'\') // will throw\nshould.not.exist({}) // will throw\n```\nOnce you know an object exists, you can safely use the _should_ property on it.\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n\'yay\'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n\'\'.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n\'1\'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that length is 0:\n```javascript\n[].should.be.empty\n\'\'.should.be.empty\n({ length: 0 }).should.be.empty\n```\n## eql\n\nequality:\n```javascript\n({ foo: \'bar\' }).should.eql({ foo: \'bar\' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n\'test\'.should.equal(\'test\')\n[1,2,3].should.not.equal([1,2,3])\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## a\n\nAssert __typeof__:\n```javascript\nuser.should.be.a(\'object\')\n\'test\'.should.be.a(\'string\')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value:\n```javascript\nuser.should.have.property(\'name\')\nuser.should.have.property(\'age\', 15)\nuser.should.not.have.property(\'rawr\')\nuser.should.not.have.property(\'age\', 0)\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: \'bar\' }).should.have.ownProperty(\'foo\')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header(\'content-length\');\nres.should.have.header(\'Content-Length\', \'123\');\nres.should.have.header(\'content-length\', \'123\');\n```\n## json\n\n Assert that Content-Type is "application/json; charset=utf-8"\n```javascript\nres.should.be.json\n```\n## html\n\n Assert that Content-Type is "text/html; charset=utf-8"\n```javascript\nres.should.be.html\n```\n## include(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n\'foo bar baz\'.should.include(\'foo\')\n\'foo bar baz\'.should.include(\'bar\')\n\'foo bar baz\'.should.include(\'baz\')\n\'foo bar baz\'.should.not.include(\'FOO\')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: \'Tobi\', age: 1 };\nvar jane = { name: \'Jane\', age: 5 };\nvar user = { name: \'TJ\', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: \'TJ\' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: \'Someone\' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n throw new Error(\'fail\');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exepection message matches string:\n\n```js\n(function(){\n throw new Error(\'fail\');\n}).should.throw(\'fail\');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n throw new Error(\'failed to foo\');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n throw new Error(\'failed to baz\');\n}).should.throwError(/^fail.*/);\n```\n\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n var obj = { foo: \'bar\', baz: \'raz\' };\n obj.should.have.keys(\'foo\', \'bar\');\n obj.should.have.keys([\'foo\', \'bar\']);\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n (1).should.eql(0, \'some useful description\')\n\n AssertionError: expected 1 to equal 0 | some useful description\n at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Express example\n\nFor example you can use should with the [Expresso TDD Framework](http://github.com/visionmedia/expresso) by simply including it:\n\n var lib = require(\'mylib\')\n , should = require(\'should\');\n\n module.exports = {\n \'test .version\': function(){\n lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n }\n };\n\n## Running tests\n\nTo run the tests for _should_ simply update your git submodules and run:\n\n $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won\'t break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\nCopyright (c) 2011 Aseem Kishore &lt;aseem.kishore@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\'Software\'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \'AS IS\', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
readmeFilename: 'Readme.md',
bugs: [Object],
_id: 'should@1.2.2',
_from: 'should@~1.2.2',
realName: 'should',
dependencies: {},
path: '/Users/ian/Projects/nlf/node_modules/should',
realPath: '/Users/ian/Projects/nlf/node_modules/should',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
jshint:
{ name: 'jshint',
version: '2.1.4',
homepage: 'http://jshint.com/',
description: 'Static analysis tool for JavaScript',
author: [Object],
repository: [Object],
bugs: [Object],
bin: [Object],
scripts: [Object],
main: './src/stable/jshint.js',
dependencies: [Object],
devDependencies: [Object],
licenses: [Object],
preferGlobal: true,
readme: 'JSHint, A Static Code Analysis Tool for JavaScript\n==================================================\n[![Build Status](https://travis-ci.org/jshint/jshint.png?branch=master)](https://travis-ci.org/jshint/jshint)\n[![NPM version](https://badge.fury.io/js/jshint.png)](http://badge.fury.io/js/jshint)\n\nJSHint is a community-driven tool to detect errors and potential problems in\nJavaScript code and to enforce your team\'s coding conventions. We made JSHint\nvery flexible so you can easily adjust it to your particular coding guidelines\nand the environment you expect your code to execute in.\n\nOur goal is to help JavaScript developers write complex programs without\nworrying about typos and language gotchas.\n\nWe believe that static code analysis programs—as well as other code quality\ntools—are important and beneficial to the JavaScript community and, thus,\nshould not alienate their users.\n\nFor general usage and hacking information, visit our website:\n[http://jshint.com/](http://jshint.com/).\n\nBug Bounties\n--------------------------------\n\nSome bugs are so important to us, we will pay you if you fix them! Go to\n[our page on BountySource](https://www.bountysource.com/#trackers/48759-jshint)\nto see which bugs have bounties behind them.\n\nReally want to have something fixed but don\'t have time? You can add your\nown bounty to any JSHint bug and make it more attractive for potential\ncontributors!\n\n**Rule:** A bug is considered fixed only after it has been merged into the\nmaster branch of the main JSHint repository.\n\nReporting a bug\n---------------\n\nTo report a bug simply create a\n[new GitHub Issue](https://github.com/jshint/jshint/issues/new) and describe\nyour problem or suggestion. We welcome all kind of feedback regarding\nJSHint including but not limited to:\n\n * When JSHint doesn\'t work as expected\n * When JSHint complains about valid JavaScript code that works in all browsers\n * When you simply want a new option or feature\n\nBefore reporting a bug look around to see if there are any open or closed tickets\nthat cover your issue. And remember the wisdom: pull request > bug report > tweet.\n\n\nFAQ\n---\n\n#### How do I turn off "mixed tabs and spaces" warning?\n\nIf you\'re using so-called [smart tabs](http://www.emacswiki.org/SmartTabs)\nthen we have an option `smarttabs` for you. Otherwise, your solution is to\nrun JSHint with a custom reporter that discards any warnings you don\'t like.\nFor example, this [example reporter](https://gist.github.com/3885619)\ndiscards all warnings about mixed tabs and spaces.\n\nContributing\n------------\n\nLook for a file named `CONTRIBUTING.md` in this repository. It contains our\ncontributing guidelines. We also have\n[a mailing list](http://groups.google.com/group/jshint/).\n\nLicense\n-------\n\nJSHint is distributed under the MIT License. One file and one file only\n(src/stable/jshint.js) is distributed under the slightly modified MIT License.\n\nAttribution\n-----------\n\nCore Team members:\n\n * [Anton Kovalyov](http://anton.kovalyov.net/) ([@valueof](http://twitter.com/valueof))\n * [Wolfgang Kluge](http://klugesoftware.de/) ([blog](http://gehirnwindung.de/))\n * [Josh Perez](http://www.goatslacker.com/) ([@goatslacker](http://twitter.com/goatslacker))\n * [Brent Lintner](http://brentlintner.heroku.com/) ([@brentlintner](http://twitter.com/brentlintner))\n * [Bernard Pratz](http://i.got.nothing.to/blog/) ([@guyzmo](https://twitter.com/guyzmo))\n\nMaintainer: Anton Kovalyov\n\nThank you!\n----------\n\nWe really appreciate all kind of feedback and contributions. Thanks for using and supporting JSHint!\n',
readmeFilename: 'README.md',
_id: 'jshint@2.1.4',
_from: 'jshint@~2.1.4',
realName: 'jshint',
path: '/Users/ian/Projects/nlf/node_modules/jshint',
realPath: '/Users/ian/Projects/nlf/node_modules/jshint',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
globs:
{ name: 'globs',
version: '0.1.1',
author: [Object],
repository: [Object],
main: 'index.js',
dependencies: [Object],
devDependencies: [Object],
description: 'An extension of glob, allowing you to provide one or more patterns to match.',
bugs: [Object],
directories: [Object],
scripts: [Object],
license: 'MIT',
readme: '# globs\n\nAn extension of [glob], allowing you to provide one or more patterns to match.\n\n## usage\n\n```js\nvar globs = require(\'globs\');\n\n// a single pattern\nglobs(\'**/*.js\', function (err, files) {\n\tif (err) {\n\t\tthrow err;\n\t}\n\n\tconsole.log(\'matched:\', files);\n});\n\n// multiple patterns\nglobs([ \'**/*.js\', \'/foo/bar/*.coffee\' ], function (err, files) {\n\tif (err) {\n\t\tthrow err;\n\t}\n\n\tconsole.log(\'matched:\', files);\n});\n\n// sync\nvar files = globs.sync([ \'**/*.js\', \'/foo/bar/*.coffee\' ], { option: \'stuff\' });\n\n```\n\n## Revision History\n\n### 0.1.1\n\n- Added MIT license \n\n### 0.1.0\n\n- Added sync support (`globs.sync(patterns)`)\n\n### 0.0.1\n\n- Initial release\n- Supports `globs(patterns/pattern)`\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2013 Stephen Mathieson &lt;me@stephenmathieson.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\'Software\'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \'AS IS\', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[glob]: https://github.com/isaacs/node-glob',
readmeFilename: 'readme.md',
_id: 'globs@0.1.1',
_from: 'globs@~0.1.0',
realName: 'globs',
path: '/Users/ian/Projects/nlf/node_modules/globs',
realPath: '/Users/ian/Projects/nlf/node_modules/globs',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} },
mocha:
{ name: 'mocha',
version: '1.12.0',
description: 'simple, flexible, fun test framework',
keywords: [Object],
author: [Object],
repository: [Object],
main: './index',
bin: [Object],
engines: [Object],
scripts: [Object],
dependencies: [Object],
devDependencies: [Object],
readme: ' [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha)\n\n [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://visionmedia.github.io/mocha)\n\n Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.io/mocha).\n\n## Contributors\n\n```\n\n project : mocha\n repo age : 1 year, 7 months\n active : 272 days\n commits : 1116\n files : 123\n authors :\n 504 TJ Holowaychuk 45.2%\n 389 Tj Holowaychuk 34.9%\n 31 Guillermo Rauch 2.8%\n 13 Attila Domokos 1.2%\n 9 John Firebaugh 0.8%\n 8 Jo Liss 0.7%\n 7 Nathan Rajlich 0.6%\n 6 James Carr 0.5%\n 6 Brendan Nee 0.5%\n 5 Aaron Heckmann 0.4%\n 4 hokaccha 0.4%\n 4 Xavier Antoviaque 0.4%\n 4 Joshua Krall 0.4%\n 3 Wil Moore III 0.3%\n 3 Jesse Dailey 0.3%\n 3 Nathan Bowser 0.3%\n 3 Tyson Tate 0.3%\n 3 Cory Thomas 0.3%\n 3 Ryunosuke SATO 0.3%\n 3 Paul Miller 0.3%\n 3 Ben Lindsey 0.3%\n 2 Forbes Lindesay 0.2%\n 2 Konstantin Käfer 0.2%\n 2 Brian Beck 0.2%\n 2 Merrick Christensen 0.2%\n 2 Michael Riley 0.2%\n 2 David Henderson 0.2%\n 2 Nathan Alderson 0.2%\n 2 Paul Armstrong 0.2%\n 2 Pete Hawkins 0.2%\n 2 Quang Van 0.2%\n 2 Raynos 0.2%\n 2 Jonas Westerlund 0.2%\n 2 Domenic Denicola 0.2%\n 2 Shawn Krisman 0.2%\n 2 Simon Gaeremynck 0.2%\n 2 FARKAS Máté 0.2%\n 2 Timo Tijhof 0.2%\n 2 Justin DuJardin 0.2%\n 2 Juzer Ali 0.2%\n 2 Ian Storm Taylor 0.2%\n 2 Arian Stolwijk 0.2%\n 2 domenic 0.2%\n 1 Richard Dingwall 0.1%\n 1 Russ Bradberry 0.1%\n 1 Sasha Koss 0.1%\n 1 Seiya Konno 0.1%\n 1 Standa Opichal 0.1%\n 1 Steve Mason 0.1%\n 1 Will Langstroth 0.1%\n 1 Yanis Wang 0.1%\n 1 Yuest Wang 0.1%\n 1 abrkn 0.1%\n 1 airportyh 0.1%\n 1 fengmk2 0.1%\n 1 tgautier@yahoo.com 0.1%\n 1 traleig1 0.1%\n 1 vlad 0.1%\n 1 yuitest 0.1%\n 1 Adam Crabtree 0.1%\n 1 Andreas Brekken 0.1%\n 1 Atsuya Takagi 0.1%\n 1 Austin Birch 0.1%\n 1 Bjørge Næss 0.1%\n 1 Brian Moore 0.1%\n 1 Bryan Donovan 0.1%\n 1 Casey Foster 0.1%\n 1 Corey Butler 0.1%\n 1 Dave McKenna 0.1%\n 1 Fedor Indutny 0.1%\n 1 Florian Margaine 0.1%\n 1 Frederico Silva 0.1%\n 1 Fredrik Lindin 0.1%\n 1 Gareth Murphy 0.1%\n 1 Gavin Mogan 0.1%\n 1 Greg Perkins 0.1%\n 1 Harry Brundage 0.1%\n 1 Herman Junge 0.1%\n 1 Ian Young 0.1%\n 1 Ivan 0.1%\n 1 Jaakko Salonen 0.1%\n 1 Jakub Nešetřil 0.1%\n 1 James Bowes 0.1%\n 1 James Lal 0.1%\n 1 Jason Barry 0.1%\n 1 Javier Aranda 0.1%\n 1 Jeff Kunkle 0.1%\n 1 Jonathan Creamer 0.1%\n 1 Jussi Virtanen 0.1%\n 1 Katie Gengler 0.1%\n 1 Kazuhito Hokamura 0.1%\n 1 Koen Punt 0.1%\n 1 Laszlo Bacsi 0.1%\n 1 László Bácsi 0.1%\n 1 Maciej Małecki 0.1%\n 1 Matt Robenolt 0.1%\n 1 Matt Smith 0.1%\n 1 Matthew Shanley 0.1%\n 1 Michael Schoonmaker 0.1%\n 1 Phil Sung 0.1%\n 1 R56 0.1%\n```\n\n## Links\n\n - [Google Group](http://groups.google.com/group/mochajs)\n - [Wiki](https://github.com/visionmedia/mocha/wiki)\n - Mocha [Extensions and reporters](https://github.com/visionmedia/mocha/wiki)\n',
readmeFilename: 'Readme.md',
bugs: [Object],
_id: 'mocha@1.12.0',
_from: 'mocha@~1.12.0',
realName: 'mocha',
path: '/Users/ian/Projects/nlf/node_modules/mocha',
realPath: '/Users/ian/Projects/nlf/node_modules/mocha',
link: undefined,
parent: [Circular],
depth: 1,
peerDependencies: {} } },
devDependencies:
{ jshint: '~2.1.4',
should: '~1.2.2',
mocha: '~1.12.0',
globs: '~0.1.0' },
engines: { node: '>=0.6' },
keywords:
[ 'license',
'licence',
'checker',
'finder',
'audit',
'legal',
'dependency',
'cli' ],
scripts: { test: 'make' },
readme: '<!-- @@NLF-IGNORE@@ -->\n\n# Node License Finder (nlf) [![Build Status](https://secure.travis-ci.org/iandotkelly/nlf.png)](http://travis-ci.org/iandotkelly/nlf) [![Dependency Status](https://gemnasium.com/iandotkelly/nlf.png)](https://gemnasium.com/iandotkelly/nlf)\n\nnlf is a utility for attempting to identify the licenses of modules in a node.js project.\n\nIt looks for license information in package.json, readme and license files in the project. Please note, in many cases\nthe utility is looking\nfor standard strings in these files, such as MIT, BSD, Apache, GPL etc - this is not error free, so if you have any \nconcerns at all about the accuracy of the results, you will need to perform a detailed manual review of the project\nand its dependencies, reading all terms of any included or referenced license.\n\n## Use\n\nnlf can be used programatically, or from the command line.\n\n### CLI\n\nTo install:\n\n```sh\n$ npm install -g nlf\n\n```\n\nTo use:\n\n```sh\n$ cd my-module\n$ nlf\n```\n\nExample output:\n<pre>\ncommander@0.6.1 [license(s): MIT]\n└── readme files: MIT\n\nread-installed@0.2.2 [license(s): BSD]\n└── license files: BSD\n\nglob@3.2.3 [license(s): BSD]\n├── package.json: BSD\n└── license files: BSD\n\narchy@0.0.2 [license(s): MIT/X11]\n└── package.json: MIT/X11\n\njson-stringify-safe@5.0.0 [license(s): BSD]\n├── package.json: BSD\n└── license files: BSD\n\nshould@1.2.2 [license(s): MIT]\n└── readme files: MIT\n</pre>\n\nFor output in CSV format use the -c (or --csv) switch:\n\n```sh\n$ cd my-module\n$ nlf -c\n```\n\nTo exclude development dependences and only analyze dependencies for production:\n\n```sh\n$ cd my-module\n$ nlf -d\n```\n\n### Programatically\n\n```javascript\nvar nlf = require(\'nlf\');\n\nvar results = nlf.find(\'/User/me/my-project\', function (err, data) {\n\t// do something with the response object.\n\tconsole.log(JSON.stringify(data));\n});\n```\n\nI will document the response object at some point, but it should be fairly straight forward.\n\nNote, if you run nlf programatically having installed it locally, it will find various spurious false positives from its own test data. So exclude the results from the nlf record.\n\n\n### Tests\n\nTo run the npm unit tests, install development dependencies and run tests with \'npm test\' or \'make\'.\n\n```sh\n$ cd nlf\n$ npm install\n$ npm test\n```\nIf you contribute to the project, tests are written in [mocha](http://visionmedia.github.com/mocha/), using [should.js](https://github.com/visionmedia/should.js/) or the node.js assert module.\n\n## License\n\n[The MIT License (MIT)](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013 Ian Kelly\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n',
readmeFilename: 'readme.md',
gitHead: 'df7f88c054665d65e1f4418e5294868c164ee103',
bugs: { url: 'https://github.com/iandotkelly/nlf/issues' },
_id: 'nlf@0.2.3',
realName: 'nlf',
path: '/Users/ian/Projects/nlf',
realPath: '/Users/ian/Projects/nlf',
link: undefined,
depth: 0,
peerDependencies: {} }
nlf@0.2.3 [license(s): MIT]
└── package.json: MIT
commander@2.0.0 [license(s): MIT]
└── readme files: MIT
read-installed@0.2.3 [license(s): BSD]
└── license files: BSD
glob@3.2.6 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
archy@0.0.2 [license(s): MIT/X11]
└── package.json: MIT/X11
should@1.2.2 [license(s): MIT]
└── readme files: MIT
jshint@2.1.4 [license(s): MIT]
└── readme files: MIT
globs@0.1.1 [license(s): MIT]
├── package.json: MIT
└── readme files: MIT
mocha@1.12.0 [license(s): MIT]
└── license files: MIT
minimatch@0.2.12 [license(s): MIT]
└── package.json: MIT
inherits@2.0.0 [license(s): WTFPL, WTFPL2]
├── package.json: WTFPL2
└── license files: WTFPL
glob@3.1.21 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
semver@2.0.11 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
slide@1.1.4 [license(s): Unknown]
read-package-json@1.1.1 [license(s): BSD]
└── license files: BSD
graceful-fs@2.0.0 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
commander@0.6.1 [license(s): MIT]
└── readme files: MIT
growl@1.7.0 [license(s): MIT]
└── readme files: MIT
jade@0.26.3 [license(s): MIT]
└── license files: MIT
diff@1.0.2 [license(s): Unknown]
debug@0.7.2 [license(s): MIT]
└── readme files: MIT
mkdirp@0.3.5 [license(s): MIT]
├── package.json: MIT
└── readme files: MIT
ms@0.3.0 [license(s): Unknown]
glob@3.2.1 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
shelljs@0.1.4 [license(s): BSD]
└── license files: BSD
underscore@1.4.4 [license(s): Unknown]
cli@0.4.4-2 [license(s): Unknown]
console-browserify@0.1.6 [license(s): MIT]
└── readme files: MIT
lru-cache@2.3.0 [license(s): MIT]
└── package.json: MIT
sigmund@1.0.0 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
mkdirp@0.3.0 [license(s): MIT/X11]
└── package.json: MIT/X11
normalize-package-data@0.2.1 [license(s): BSD]
└── license files: BSD
graceful-fs@1.2.3 [license(s): BSD]
├── package.json: BSD
└── license files: BSD
inherits@1.0.0 [license(s): Unknown]
github-url-from-git@1.1.1 [license(s): MIT]
└── package.json: MIT

Sorry, the diff of this file is too big to display