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
sumomo-0.10.1 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.10.0 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
reed_sdk-1.0.1 node_modules/lodash/_castFunction.js
reed_sdk-1.0.0 node_modules/lodash/_castFunction.js
boring_generators-0.12.0 tmp/templates/app_template/node_modules/lodash/_castFunction.js
sumomo-0.9.0 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.8.22 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.8.21 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.8.20 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.8.17 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
sumomo-0.8.16 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
disco_app-0.18.0 test/dummy/node_modules/lodash/_castFunction.js
disco_app-0.18.2 test/dummy/node_modules/lodash/_castFunction.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/lodash/_castFunction.js
trusty-cms-5.0.7 node_modules/lodash/_castFunction.js
appmap-0.72.2 ./node_modules/lodash/_castFunction.js
trusty-cms-5.0.6 node_modules/lodash/_castFunction.js
appmap-0.72.1 ./node_modules/lodash/_castFunction.js
appmap-0.72.0 ./node_modules/lodash/_castFunction.js
trusty-cms-5.0.5 node_modules/lodash/_castFunction.js