Sha256: aa3c8febeb01f2f99e55dd33cd68b357585e2e2074acfe8204202192ca8e91bb

Contents?: true

Size: 705 Bytes

Versions: 153

Compression:

Stored size: 705 Bytes

Contents

var LazyWrapper = require('./LazyWrapper'),
    getData = require('./getData'),
    getFuncName = require('./getFuncName'),
    lodash = require('../chain/lodash');

/**
 * Checks if `func` has a lazy counterpart.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
 */
function isLaziable(func) {
  var funcName = getFuncName(func),
      other = lodash[funcName];

  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
    return false;
  }
  if (func === other) {
    return true;
  }
  var data = getData(other);
  return !!data && func === data[0];
}

module.exports = isLaziable;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/contents/node_modules/lodash/internal/isLaziable.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/isLaziable.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/internal/isLaziable.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/internal/isLaziable.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/internal/isLaziable.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/isLaziable.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/internal/isLaziable.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/internal/isLaziable.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js