Sha256: d7b164a9bfc94ce4df4c26d318fbec98320fc8c26a0d9dabd011efde368048f1

Contents?: true

Size: 326 Bytes

Versions: 292

Compression:

Stored size: 326 Bytes

Contents

var identity = require('./identity');

/**
 * Casts `value` to `identity` if it's not a function.
 *
 * @private
 * @param {*} value The value to inspect.
 * @returns {Function} Returns cast function.
 */
function castFunction(value) {
  return typeof value == 'function' ? value : identity;
}

module.exports = castFunction;

Version data entries

292 entries across 268 versions & 32 rubygems

Version Path
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.6 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
clapton-0.0.1 lib/clapton/javascripts/node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.47 node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.46 node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.45 node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.44 node_modules/lodash/_castFunction.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.43 node_modules/lodash/_castFunction.js
immosquare-cleaner-0.1.42 node_modules/lodash/_castFunction.js