<commit_before>/**
 *
 * @description Performs license search
 *
 * @author <NAME>
 * @copyright Copyright (C) <NAME> 2013
 *
 * @license [url] The MIT License
 *
 */
'use strict';

var readInstalled = require('read-installed'),
	Module = require('./module'),
	path = require('path'),
	fs = require('fs'),
	glob = require('glob-all'),
	FileSource = require('./file-source'),
	PackageSource = require('./package-source'),
	csvFormatter = require('./formatters/csv'),
	standardFormatter = require('./formatters/standard'),
	LicenseCollection = require('./license-collection'),
	licenseFind = require('./license-find');

/**
 * 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) {

	// this might be the root object - which by definition is production
	if (moduleData.parent === undefined) {
		return false;
	}

	var dependencies = moduleData.parent.devDependencies || {},
		dependencyName;

	// look for this module in the production dependencies of the parent
	// and return true if it is found
	for (dependencyName in dependencies) {
		if (dependencies.hasOwnProperty(dependencyName)) {
			if (dependencyName === moduleData.name) {
				return true;
			}
		}
	}<commit_msg>iandotkelly/nlf#31 Fix: dev dependencies are shown in --no-dev mode.<commit_after>/**
 *
 * @description Performs license search
 *
 * @author <NAME>
 * @copyright Copyright (C) <NAME> 2013
 *
 * @license [url] The MIT License
 *
 */
'use strict';

var readInstalled = require('read-installed'),
	Module = require('./module'),
	path = require('path'),
	fs = require('fs'),
	glob = require('glob-all'),
	FileSource = require('./file-source'),
	PackageSource = require('./package-source'),
	csvFormatter = require('./formatters/csv'),
	standardFormatter = require('./formatters/standard'),
	LicenseCollection = require('./license-collection'),
	licenseFind = require('./license-find');

/**
 * 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) {

	// this might be the root object - which by definition is production
	if (moduleData.parent === undefined) {
		return false;
	}

	if (moduleData.extraneous) {
		return true;
	}

	var dependencies = moduleData.parent.devDependencies || {},
		dependencyName;

	// look for this module in the production dependencies of the parent
	// and return true if it is found
	for (dependencyName in dependencies) {
		if (dependencies.hasOwnProperty(dependencyName)) {
			if (dependencyName === moduleData.name) {
				return true;
			}
		}
	}
{'fraction_non_alphanumeric': 0.13607142857142857, 'fraction_numerical': 0.0035714285714285713, 'mean_word_length': 4.001785714285714, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2909705', 'n_tokens_mistral': 824, 'n_tokens_neox': 770, 'n_words': 248}