Sha256: 94575a6628739b81cd429d95e81a6fbb3509e324183ddedee614437ec27291a2

Contents?: true

Size: 895 Bytes

Versions: 300

Compression:

Stored size: 895 Bytes

Contents

var baseMatches = require('./_baseMatches'),
    baseMatchesProperty = require('./_baseMatchesProperty'),
    identity = require('./identity'),
    isArray = require('./isArray'),
    property = require('./property');

/**
 * The base implementation of `_.iteratee`.
 *
 * @private
 * @param {*} [value=_.identity] The value to convert to an iteratee.
 * @returns {Function} Returns the iteratee.
 */
function baseIteratee(value) {
  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  if (typeof value == 'function') {
    return value;
  }
  if (value == null) {
    return identity;
  }
  if (typeof value == 'object') {
    return isArray(value)
      ? baseMatchesProperty(value[0], value[1])
      : baseMatches(value);
  }
  return property(value);
}

module.exports = baseIteratee;

Version data entries

300 entries across 276 versions & 32 rubygems

Version Path
disco_app-0.18.2 test/dummy/node_modules/lodash/_baseIteratee.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/lodash/_baseIteratee.js
trusty-cms-5.0.7 node_modules/lodash/_baseIteratee.js
appmap-0.72.2 ./node_modules/lodash/_baseIteratee.js
trusty-cms-5.0.6 node_modules/lodash/_baseIteratee.js
appmap-0.72.1 ./node_modules/lodash/_baseIteratee.js
appmap-0.72.0 ./node_modules/lodash/_baseIteratee.js
trusty-cms-5.0.5 node_modules/lodash/_baseIteratee.js
trusty-cms-5.0.4 node_modules/lodash/_baseIteratee.js
appmap-0.71.0 ./node_modules/lodash/_baseIteratee.js
disco_app-0.16.1 test/dummy/node_modules/lodash/_baseIteratee.js
appmap-0.70.2 ./node_modules/lodash/_baseIteratee.js
sumomo-0.8.14 data/sumomo/api_modules/node_modules/lodash/_baseIteratee.js
appmap-0.70.1 ./node_modules/lodash/_baseIteratee.js
appmap-0.70.0 ./node_modules/lodash/_baseIteratee.js
appmap-0.69.0 ./node_modules/lodash/_baseIteratee.js
sumomo-0.8.13 data/sumomo/api_modules/node_modules/lodash/_baseIteratee.js
appmap-0.68.2 ./node_modules/lodash/_baseIteratee.js
appmap-0.68.1 ./node_modules/lodash/_baseIteratee.js
disco_app-0.15.2 test/dummy/node_modules/lodash/_baseIteratee.js