<commit_before>'use strict';

// MODULES //

var isObject = require( 'validate.io-object' ),
	isString = require( 'validate.io-string-primitive' ),
	contains = require( 'validate.io-contains' ),
	isStringArray = require( 'validate.io-string-array' ),
	isValidEmail = require( 'validate.io-email-address' ),
	isValidName = require( 'validate-npm-package-name' ),
	templates = require( './templates.js' );


// VALIDATE //

/**
* FUNCTION: validate( opts, options )
*	Validates function options.
*
* @param {Object} opts - destination object
* @param {Object} options - function options
* @param {String} [opts.template] - package.json template to use
* @param {String} [opts.name] - package name
* @param {String} [opts.desc] - package description
* @param {String} [opts.author] - package author
* @param {String} [opts.email] - package author email
* @param {String} [opts.repo] - package Github repository
* @param {String} [opts.cmd] - package command name, if package is a CLI tool
* @param {String[]} [opts.keywords] - package keywords
* @param {String} [opts.license] - package license
* @returns {Null|Error} null or an error
*/
function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( 'cp()::invalid input argument. Options argument must be an object. Value: `' + options + '`.' );
	}
	if ( options.hasOwnProperty( 'template' ) ) {
		opts.template = options.template;<commit_msg>[FIX] jsdoc.<commit_after>'use strict';

// MODULES //

var isObject = require( 'validate.io-object' ),
	isString = require( 'validate.io-string-primitive' ),
	contains = require( 'validate.io-contains' ),
	isStringArray = require( 'validate.io-string-array' ),
	isValidEmail = require( 'validate.io-email-address' ),
	isValidName = require( 'validate-npm-package-name' ),
	templates = require( './templates.js' );


// VALIDATE //

/**
* FUNCTION: validate( opts, options )
*	Validates function options.
*
* @param {Object} opts - destination object
* @param {Object} options - function options
* @param {String} [options.template] - package.json template to use
* @param {String} [options.name] - package name
* @param {String} [options.desc] - package description
* @param {String} [options.author] - package author
* @param {String} [options.email] - package author email
* @param {String} [options.repo] - package Github repository
* @param {String} [options.cmd] - package command name, if package is a CLI tool
* @param {String[]} [options.keywords] - package keywords
* @param {String} [options.license] - package license
* @returns {Null|Error} null or an error
*/
function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( 'cp()::invalid input argument. Options argument must be an object. Value: `' + options + '`.' );
	}
	if ( options.hasOwnProperty( 'template' ) ) {
		opts.template = options.template;
{'fraction_non_alphanumeric': 0.15505226480836237, 'fraction_numerical': 0.0, 'mean_word_length': 4.306839186691312, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4353050', 'n_tokens_mistral': 877, 'n_tokens_neox': 870, 'n_words': 262}