Lines Matching full:_

345   var _ = root._ || (root._ = interopRequire(filePath));  variable
349 var MapCache = (_.memoize || lodashStable.memoize).Cache;
354 (_.isMatchWith || lodashStable.isMatchWith)({ 'a': 1 }, { 'a': 1 }, function() {
377 /** Used to restore the `_` reference. */
378 var oldDash = root._;
588 root._ = oldDash;
673 _._realm = realm;
684 'var _ = parent._,',
713 "_.each(['" + arrayViews.join("', '") + "'], function(type) {",
719 '_.assign(_._realm, object);',
726 delete _._realm;
733 _._VERSION = e.data || '';
751 _['_' + funcName] = interopRequire(path.join(basePath, '_' + funcName));
808 var actual = _._VERSION;
813 assert.strictEqual(actual, _.VERSION);
858 var label = message('_.create', 'Object.create');
870 label = message('_.difference`, `_.intersection`, and `_.uniq', 'Map');
884 label = message('_.clone` and `_.cloneDeep', 'Object.getOwnPropertySymbols');
898 label = message('_.clone`, `_.isEqual`, and `_.toString', 'Symbol');
907 label = message('_.memoize.Cache', 'Map');
919 label = message('_.toArray', 'Map');
933 var func = _._isIndex;
978 func = _._isIterateeCall,
1121 return _(value) instanceof _;
1136 var wrapped = _(value);
1137 return _(wrapped) === wrapped;
1152 var wrapped = _(lodashBizarro(value)),
1155 return wrapped instanceof _ &&
1175 assert.strictEqual(_.add(6, 4), 10);
1176 assert.strictEqual(_.add(-6, 4), -2);
1177 assert.strictEqual(_.add(-6, -4), -10);
1183 assert.strictEqual(_.add('6', '4'), '64');
1184 assert.strictEqual(_.add('x', 'y'), 'xy');
1195 lodashStable.times(times, _.after(n, function() { count++; }));
1217 var after = _.after(1, function(assert) { return ++this.count; }),
1238 var actual = lodashStable.map(['6', '8', '10'], _.ary(parseInt, 1));
1241 var capped = _.ary(fn, 2);
1248 var capped = _.ary(fn);
1255 var capped = _.ary(fn, -1);
1271 var capped = _.ary(fn, n);
1282 capped = _.ary(fn, 3);
1298 var capped = _.ary(function(a, b) { return this; }, 1),
1307 var capped = _.ary(_.ary(fn, 1), 2);
1311 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
1314 var funcs = lodashStable.map([fn], _.ary),
1324 includes = _.curry(_.rearg(_.ary(_.includes, 2), 1, 0), 2);
1329 includes = _(_.includes).ary(2).rearg(1, 0).curry(2).value();
1346 assert.strictEqual(_.extend, _.assignIn);
1355 var func = _[methodName];
1357 …QUnit.test('`_.' + methodName + '` should assign source properties to `object`', function(assert) {
1363 QUnit.test('`_.' + methodName + '` should accept multiple sources', function(assert) {
1371 QUnit.test('`_.' + methodName + '` should overwrite destination properties', function(assert) {
1378 …QUnit.test('`_.' + methodName + '` should assign source properties with nullish values', function(…
1385 …QUnit.test('`_.' + methodName + '` should skip assignments if values are the same', function(asser…
1428 … QUnit.test('`_.' + methodName + '` should treat sparse array sources as dense', function(assert) {
1437 … QUnit.test('`_.' + methodName + '` should assign values of prototype objects', function(assert) {
1446 QUnit.test('`_.' + methodName + '` should coerce string sources to objects', function(assert) {
1461 assert.strictEqual(_.extendWith, _.assignInWith);
1470 var func = _[methodName];
1472 QUnit.test('`_.' + methodName + '` should work with a `customizer` callback', function(assert) {
1482 …QUnit.test('`_.' + methodName + '` should work with a `customizer` that returns `undefined`', func…
1501 var actual = _.at(array, [0, 2]);
1508 var actual = _.at(array, [2, 4, 0]);
1524 actual = _.at(array, values);
1532 assert.deepEqual(_.at(array), []);
1533 assert.deepEqual(_.at(array, [], []), []);
1539 var actual = _.at(['a', 'b', 'c', 'd'], 3, 0, 2);
1550 return _.at(object, 0, 1, 'pop', 'push');
1560 var actual = _.at(args, [2, 0]);
1567 var actual = _.at([1, 2, 3, 4, 5], args);
1574 var actual = _.at(object, ['a[0].b.c', 'a[1]']);
1586 var actual = _.at(new Foo, 'b');
1600 wrapped = _(array).map(identity).at(paths);
1602 assert.deepEqual(wrapped.value(), _.at(_.map(array, identity), paths));
1622 var actual = _(array).map(iteratee).at(n).value(),
1641 actual = _(object).map(identity).at(paths).value();
1643 assert.deepEqual(actual, _.at(_.map(object, identity), paths));
1646 actual = _(indexObject).at(0).value();
1647 assert.deepEqual(actual, _.at(indexObject, 0));
1663 assert.strictEqual(_.attempt(lodashStable.constant('x')), 'x');
1669 var actual = _.attempt(function() { return slice.call(arguments); }, 1, 2);
1679 return _.attempt(function() { throw error; }) === error;
1688 var actual = _.attempt(function() { throw 'x'; });
1695 var actual = _.attempt(function() { throw new CustomError('x'); });
1706 return _.attempt(function() { throw error; }) === error;
1720 assert.strictEqual(_(lodashStable.constant('x')).attempt(), 'x');
1731 assert.ok(_(lodashStable.constant('x')).chain().attempt() instanceof _);
1746 lodashStable.times(times, _.before(n, function() { count++; }));
1768 var before = _.before(2, function(assert) { return ++this.count; }),
1792 bound = _.bind(fn, object);
1805 var bound = _.bind(fn, value);
1818 var bound = _.bind(fn, null),
1825 bound = index ? _.bind(fn, undefined) : _.bind(fn);
1837 bound = _.bind(fn, object, 'a');
1841 bound = _.bind(fn, object, 'a');
1844 bound = _.bind(fn, object, 'a', 'b');
1853 ph = _.bind.placeholder,
1854 bound = _.bind(fn, object, ph, 'b', ph);
1862 QUnit.test('should use `_.placeholder` when set', function(assert) {
1866 var _ph = _.placeholder = {},
1867 ph = _.bind.placeholder,
1869 bound = _.bind(fn, object, _ph, 'b', ph);
1872 delete _.placeholder;
1883 bound = _.bind(fn, {});
1887 bound = _.bind(fn, {}, 1);
1898 var bound = _.bind(Foo, { 'a': 1 }),
1916 boundFoo = _.bind(Foo, thisArg),
1917 boundBar = _.bind(Bar, thisArg),
1947 var bound = _.bind(Foo),
1958 bound = _.bind(fn, object, 'a');
1970 var bound1 = _.bind(fn, object1),
1971 bound2 = _.bind(bound1, object2, 'a'),
1972 bound3 = _.bind(bound1, object3, 'b');
1982 var Ctor = _.bind(Date, null),
1991 Ctor = _.bind(Date, null, 2012, 4, 23);
2006 var bound = _.bind(createCtor()),
2037 bound = _(fn).bind({}, 'a', 'b');
2039 assert.ok(bound instanceof _);
2076 _.bindAll(object, 'a', 'b');
2089 _.bindAll(object, ['a', 'b'], ['c']);
2105 _.bindAll(object, key);
2116 _.bindAll(array);
2124 _.bindAll(object, args);
2149 var bound = _.bindKey(object, 'greet', 'hi');
2168 var ph = _.bindKey.placeholder,
2169 bound = _.bindKey(object, 'fn', ph, 'b', ph);
2177 QUnit.test('should use `_.placeholder` when set', function(assert) {
2187 var _ph = _.placeholder = {},
2188 ph = _.bindKey.placeholder,
2189 bound = _.bindKey(object, 'fn', _ph, 'b', ph);
2192 delete _.placeholder;
2207 bound = _.bindKey(object, 'Foo');
2220 func = _[methodName];
2238 …QUnit.test('`_.' + methodName + '` should convert `string` to ' + caseName + ' case', function(ass…
2249 QUnit.test('`_.' + methodName + '` should handle double-converting strings', function(assert) {
2260 QUnit.test('`_.' + methodName + '` should deburr letters', function(assert) {
2278 QUnit.test('`_.' + methodName + '` should remove contraction apostrophes', function(assert) {
2303 … QUnit.test('`_.' + methodName + '` should remove Latin mathematical operators', function(assert) {
2310 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
2318 …QUnit.test('`_.' + methodName + '` should return an unwrapped value implicitly when chaining', fun…
2322 assert.strictEqual(_('foo bar')[methodName](), converted);
2329 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
2333 assert.ok(_('foo bar').chain()[methodName]() instanceof _);
2345 …var funcs = [_.camelCase, _.kebabCase, _.lowerCase, _.snakeCase, _.startCase, _.lowerCase, _.camel…
2363 assert.strictEqual(_.camelCase('12 feet'), '12Feet');
2364 assert.strictEqual(_.camelCase('enable 6h format'), 'enable6HFormat');
2365 assert.strictEqual(_.camelCase('enable 24H format'), 'enable24HFormat');
2366 assert.strictEqual(_.camelCase('too legit 2 quit'), 'tooLegit2Quit');
2367 assert.strictEqual(_.camelCase('walk 500 miles'), 'walk500Miles');
2368 assert.strictEqual(_.camelCase('xhr2 request'), 'xhr2Request');
2375 assert.strictEqual(_.camelCase(string), 'safeHtml');
2379 assert.strictEqual(_.camelCase(string), 'escapeHtmlEntities');
2383 assert.strictEqual(_.camelCase(string), 'xmlHttpRequest');
2396 assert.strictEqual(_.capitalize('fred'), 'Fred');
2397 assert.strictEqual(_.capitalize('Fred'), 'Fred');
2398 assert.strictEqual(_.capitalize(' fred'), ' fred');
2412 actual = lodashStable.map(values, _.castArray);
2421 assert.strictEqual(_.castArray(array), array);
2427 assert.deepEqual(_.castArray(), []);
2440 var actual = _.chain({ 'a': 0 });
2441 assert.ok(actual instanceof _);
2452 var wrapped = _({ 'a': 0 });
2453 assert.strictEqual(_.chain(wrapped), wrapped);
2467 assert.ok(_.chain(array).head() instanceof _);
2468 assert.ok(_(array).chain().head() instanceof _);
2470 assert.ok(_.chain(array).isArray() instanceof _);
2471 assert.ok(_(array).chain().isArray() instanceof _);
2473 assert.ok(_.chain(array).sortBy().head() instanceof _);
2474 assert.ok(_(array).chain().sortBy().head() instanceof _);
2488 wrapped = index ? _(array).chain() : _.chain(array);
2504 wrapped = index ? _(array).chain() : _.chain(array);
2515 wrapped = index ? _(array).chain() : _.chain(array);
2543 var actual = _.chunk(array, 3);
2550 var actual = _.chunk(array, 4);
2562 return index ? _.chunk(array, size) : _.chunk(array);
2575 return _.chunk(array, n);
2584 assert.deepEqual(_.chunk(array, array.length / 4), [[0], [1], [2], [3], [4], [5]]);
2587 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
2590 var actual = lodashStable.map([[1, 2], [3, 4]], _.chunk);
2603 assert.strictEqual(_.clamp(5, 3), 3);
2604 assert.strictEqual(_.clamp(1, 3), 1);
2610 assert.strictEqual(_.clamp(-10, -5, 5), -5);
2611 assert.strictEqual(_.clamp(-10.2, -5.5, 5.5), -5.5);
2612 assert.strictEqual(_.clamp(-Infinity, -5, 5), -5);
2618 assert.strictEqual(_.clamp(10, -5, 5), 5);
2619 assert.strictEqual(_.clamp(10.6, -5.6, 5.4), 5.4);
2620 assert.strictEqual(_.clamp(Infinity, -5, 5), 5);
2626 assert.strictEqual(_.clamp(-4, -5, 5), -4);
2627 assert.strictEqual(_.clamp(-5, -5, 5), -5);
2628 assert.strictEqual(_.clamp(-5.5, -5.6, 5.6), -5.5);
2634 assert.strictEqual(_.clamp(4, -5, 5), 4);
2635 assert.strictEqual(_.clamp(5, -5, 5), 5);
2636 assert.strictEqual(_.clamp(4.5, -5.1, 5.2), 4.5);
2642 assert.strictEqual(1 / _.clamp(0, -5, 5), Infinity);
2648 assert.strictEqual(1 / _.clamp(-10, 0, 5), Infinity);
2654 assert.strictEqual(1 / _.clamp(-0, -5, 5), -Infinity);
2660 assert.strictEqual(1 / _.clamp(-10, -0, 5), -Infinity);
2666 assert.deepEqual(_.clamp(NaN, -5, 5), NaN);
2672 assert.deepEqual(_.clamp(1, -5, NaN), 0);
2673 assert.deepEqual(_.clamp(-1, NaN, 5), 0);
2734 QUnit.test('`_.clone` should perform a shallow clone', function(assert) {
2738 actual = _.clone(array);
2744 … QUnit.test('`_.cloneDeep` should deep clone objects with circular references', function(assert) {
2755 var actual = _.cloneDeep(object);
2759 …QUnit.test('`_.cloneDeep` should deep clone objects with lots of circular references', function(as…
2767 var clone = _.cloneDeep(cyclical),
2774 QUnit.test('`_.cloneDeepWith` should provide `stack` to `customizer`', function(assert) {
2779 _.cloneDeepWith({ 'a': 1 }, function() {
2780 actual = _.last(arguments);
2790 var func = _[methodName],
2794 QUnit.test('`_.' + methodName + '` should clone ' + kind, function(assert) {
2808 QUnit.test('`_.' + methodName + '` should clone array buffers', function(assert) {
2821 QUnit.test('`_.' + methodName + '` should clone buffers', function(assert) {
2840 …QUnit.test('`_.' + methodName + '` should clone `index` and `input` array properties', function(as…
2850 … QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
2859 QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
2877 QUnit.test('`_.' + methodName + '` should clone prototype objects', function(assert) {
2886 … QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone', function(assert) {
2892 …QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone even when the `constr…
2900 …QUnit.test('`_.' + methodName + '` should ensure `value` constructor is a function before using it…
2908 …QUnit.test('`_.' + methodName + '` should clone properties that shadow those on `Object.prototype`…
2927 QUnit.test('`_.' + methodName + '` should clone symbol properties', function(assert) {
2968 QUnit.test('`_.' + methodName + '` should clone symbol objects', function(assert) {
2986 QUnit.test('`_.' + methodName + '` should not clone symbol primitives', function(assert) {
2997 QUnit.test('`_.' + methodName + '` should not error on DOM elements', function(assert) {
3014 …QUnit.test('`_.' + methodName + '` should create an object from the same realm as `value`', functi…
3019 var objects = lodashStable.transform(_, function(result, value, key) {
3020 if (lodashStable.startsWith(key, '_') && lodashStable.isObject(value) &&
3040 …QUnit.test('`_.' + methodName + '` should perform a ' + (isDeep ? 'deep' : 'shallow') + ' clone wh…
3055 …QUnit.test('`_.' + methodName + '` should return a unwrapped value when chaining', function(assert…
3060 actual = _(object)[methodName]();
3071 QUnit.test('`_.' + methodName + '` should clone ' + type + ' values', function(assert) {
3096 QUnit.test('`_.' + methodName + '` should not clone ' + key, function(assert) {
3116 var func = _[methodName],
3119 …QUnit.test('`_.' + methodName + '` should provide correct `customizer` arguments', function(assert…
3135 …QUnit.test('`_.' + methodName + '` should handle cloning when `customizer` returns `undefined`', f…
3143 …QUnit.test('`_.' + methodName + '` should work with a `customizer` callback and ' + key, function(…
3174 assert.deepEqual(_.compact(falsey.concat(array)), array);
3181 var actual = _(falsey).thru(_.slice).compact().thru(_.slice).value();
3184 actual = _(falsey).thru(_.slice).push(true, 1).compact().push('a').value();
3196 var actual = _(largeArray).slice(1).compact().reverse().take().value();
3197 assert.deepEqual(actual, _.take(_.compact(_.slice(largeArray, 1)).reverse()));
3204 QUnit.test('should work in a lazy sequence with a custom `_.iteratee`', function(assert) {
3208 var iteratee = _.iteratee,
3211 _.iteratee = identity;
3214 var actual = _(largeArray).slice(1).compact().value();
3215 pass = lodashStable.isEqual(actual, _.compact(_.slice(largeArray, 1)));
3219 _.iteratee = iteratee;
3236 actual = _.concat(array);
3246 actual = _.concat(array, 2, [3], [[4]]);
3262 return index ? _.concat(value) : _.concat();
3272 return _.concat(value, [2], [[3]]);
3282 actual = _.concat(Array(1), Array(1));
3296 wrapped = _(array).concat([2, 3]),
3316 var cond = _.cond([
3334 var cond = _.cond([[
3348 var cond = _.cond([
3362 var cond = _.cond([[stubFalse, stubA]]);
3370 assert.raises(function() { _.cond([[stubTrue, value]])(); }, TypeError);
3377 var cond = _.cond([
3396 par = _.conforms(source);
3413 return isConforms ? _.conforms(source) : function(object) {
3414 return _.conformsTo(object, source);
3418 …QUnit.test('`_.' + methodName + '` should check if `object` conforms to `source`', function(assert…
3443 …QUnit.test('`_.' + methodName + '` should not match by inherited `source` properties', function(as…
3467 …QUnit.test('`_.' + methodName + '` should not invoke `source` predicates for missing `object` prop…
3480 QUnit.test('`_.' + methodName + '` should work with a function for `object`', function(assert) {
3497 QUnit.test('`_.' + methodName + '` should work with a function for `source`', function(assert) {
3509 QUnit.test('`_.' + methodName + '` should work with a non-plain `object`', function(assert) {
3524 …QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(asser…
3543 …QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source` to a null…
3559 …QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source`', functio…
3584 constant = _.constant(object);
3604 var constant = index ? _.constant(value) : _.constant(),
3617 var wrapped = _(true).constant();
3618 assert.ok(wrapped instanceof _);
3636 var actual = _.countBy(array, Math.floor);
3640 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
3648 return index ? _.countBy(array, value) : _.countBy(array);
3654 QUnit.test('should work with `_.property` shorthands', function(assert) {
3657 var actual = _.countBy(['one', 'two', 'three'], 'length');
3664 var actual = _.countBy(array, function(n) {
3681 assert.deepEqual(_.countBy(array, 0), { '1': 1, '2': 2 });
3682 assert.deepEqual(_.countBy(array, 1), { 'a': 2, 'b': 1 });
3688 var actual = _.countBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
3701 var actual = _(array).countBy().map(square).filter(isEven).take().value();
3703 assert.deepEqual(actual, _.take(_.filter(_.map(_.countBy(array), square), isEven)));
3728 Circle.prototype = _.create(Shape.prototype);
3742 Circle.prototype = _.create(Shape.prototype, expected);
3760 assert.deepEqual(_.create({}, new Foo), { 'a': 1, 'c': 3 });
3769 var object = _.create(new Foo, { 'a': 1 });
3779 return index ? _.create(prototype) : _.create();
3791 return lodashStable.isPlainObject(index ? _.create(value) : _.create());
3797 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
3802 objects = lodashStable.map(array, _.create);
3805 return object.a === 1 && !_.keys(object).length;
3824 var curried = _.curry(fn),
3835 var curried = _.curry(fn, 3),
3850 return _.curry(fn, arity)();
3854 assert.deepEqual(_.curry(fn, '2')(1)(2), [1, 2]);
3860 var curried = _.curry(fn),
3872 var curried = _.curry(fn),
3879 QUnit.test('should use `_.placeholder` when set', function(assert) {
3883 var curried = _.curry(fn),
3884 _ph = _.placeholder = {},
3888 delete _.placeholder;
3898 var curried = _.curry(fn, 3);
3908 var curried = index ? _.curry(fn, 4) : _.curry(fn);
3922 var curried = _.curry(Foo),
3940 assert.deepEqual(_.curry(_.bind(fn, object), 3)('a')('b')('c'), expected);
3941 assert.deepEqual(_.curry(_.bind(fn, object), 3)('a', 'b')('c'), expected);
3942 assert.deepEqual(_.curry(_.bind(fn, object), 3)('a', 'b', 'c'), expected);
3944 assert.deepEqual(_.bind(_.curry(fn), object)('a')('b')('c'), Array(3));
3945 assert.deepEqual(_.bind(_.curry(fn), object)('a', 'b')('c'), Array(3));
3946 assert.deepEqual(_.bind(_.curry(fn), object)('a', 'b', 'c'), expected);
3948 object.curried = _.curry(fn);
3957 var curried = _.curry(fn),
3960 var a = _.partial(curried, 1),
3961 b = _.bind(a, null, 2),
3962 c = _.partialRight(b, 4),
3963 d = _.partialRight(b(3), 4);
3982 var curried = _.curryRight(fn),
3993 var curried = _.curryRight(fn, 3),
4008 return _.curryRight(fn, arity)();
4012 assert.deepEqual(_.curryRight(fn, '2')(1)(2), [2, 1]);
4018 var curried = _.curryRight(fn),
4031 var curried = _.curryRight(fn),
4038 QUnit.test('should use `_.placeholder` when set', function(assert) {
4042 var curried = _.curryRight(fn),
4043 _ph = _.placeholder = {},
4047 delete _.placeholder;
4057 var curried = _.curryRight(fn, 3);
4067 var curried = index ? _.curryRight(fn, 4) : _.curryRight(fn);
4081 var curried = _.curryRight(Foo),
4099 assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('c')('b')('a'), expected);
4100 assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('b', 'c')('a'), expected);
4101 assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('a', 'b', 'c'), expected);
4103 assert.deepEqual(_.bind(_.curryRight(fn), object)('c')('b')('a'), Array(3));
4104 assert.deepEqual(_.bind(_.curryRight(fn), object)('b', 'c')('a'), Array(3));
4105 assert.deepEqual(_.bind(_.curryRight(fn), object)('a', 'b', 'c'), expected);
4107 object.curried = _.curryRight(fn);
4116 var curried = _.curryRight(fn),
4119 var a = _.partialRight(curried, 4),
4120 b = _.partialRight(a, 3),
4121 c = _.bind(b, null, 1),
4122 d = _.partial(b(2), 1);
4134 var func = _[methodName],
4138 …QUnit.test('`_.' + methodName + '` should not error on functions with the same name as lodash meth…
4154 …QUnit.test('`_.' + methodName + '` should work for function names that shadow those on `Object.pro…
4157 var curried = _.curry(function hasOwnProperty(a, b, c) {
4166 …QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(…
4197 var debounced = _.debounce(function(value) {
4225 var debounced = _.debounce(identity, 32);
4244 debounced = _.debounce(function() { ++callCount; }, 0);
4262 debounced = _.debounce(function() { callCount++; }, 32, {});
4280 var withLeading = _.debounce(function() {
4284 var withLeadingAndTrailing = _.debounce(function() {
4310 var debounced = _.debounce(identity, 32, { 'leading': true, 'trailing': false }),
4330 var withTrailing = _.debounce(function() {
4334 var withoutTrailing = _.debounce(function() {
4358 var debounced = _.debounce(function(value) {
4389 var withMaxWait = _.debounce(function() {
4393 var withoutMaxWait = _.debounce(function() {
4416 var debounced = _.debounce(function() {
4439 var debounced = _.debounce(function() {
4465 var debounced = _.debounce(function(value) {
4492 var actual = lodashStable.map(burredLetters, _.deburr);
4500 actual = lodashStable.map(operators, _.deburr);
4511 return _.deburr('e' + chr + 'i');
4526 var actual = _.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
4534 actual = _.defaults({ 'a': 1, 'b': 2 }, { 'b': 3 }, { 'c': 3 });
4538 actual = _.defaults({ 'a': 1, 'b': 2 }, { 'b': 3, 'c': 3 }, { 'c': 2 });
4545 var actual = _.defaults({ 'a': null }, { 'a': 1 });
4552 var actual = _.defaults({ 'a': undefined }, { 'a': 1 });
4560 actual = _.defaults({}, source);
4589 assert.deepEqual(_.defaults({}, source), expected);
4592 assert.deepEqual(_.defaults({}, object, source), expected);
4608 assert.deepEqual(_.defaultsDeep(object, source), expected);
4620 assert.deepEqual(_.defaultsDeep({ 'a': { 'b': 2 } }, source1, source2), expected);
4621 assert.deepEqual(_.defaultsDeep({ 'a': { 'b': 2 } }, source3, source4), expected);
4629 actual = _.defaultsDeep(object, source);
4639 actual = _.defaultsDeep(object, source);
4647 var actual = _.defaultsDeep({}, { 'a': noop });
4650 actual = _.defaultsDeep({}, { 'a': { 'b': noop } });
4659 actual = _.defaultsDeep(object, source);
4669 actual = _.defaultsDeep({}, source);
4691 var actual = _.defaultsDeep(object, source);
4702 actual = _.defaultsDeep({}, source1, source2);
4712 var actual = _.defaultsDeep({ 'a': ['abc'] }, { 'a': 'abc' });
4719 _.defaultsDeep({}, { 'constructor': { 'a': 1 } });
4741 return _.defaultTo(value, 1);
4759 _.defer(function() { pass = true; });
4774 _.defer(function() {
4790 timerId = _.defer(function() { pass = false; });
4812 _.delay(function() { pass = true; }, 32);
4831 _.delay(function() {
4847 _.delay(function() { pass = true; });
4863 timerId = _.delay(function() { pass = false; }, 32);
4881 _.delay(function() { pass = true; }, 32);
4897 var func = _[methodName];
4899 … QUnit.test('`_.' + methodName + '` should return the difference of two arrays', function(assert) {
4906 …QUnit.test('`_.' + methodName + '` should return the difference of multiple arrays', function(asse…
4913 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
4928 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
4934 QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
4949 …QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert)…
4966 QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
4973 QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
4983 …QUnit.test('`_.' + methodName + '` should ignore values that are not array-like', function(assert)…
5002 var actual = _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
5005 actual = _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
5014 _.differenceBy([2.1, 1.2], [2.3, 3.4], function() {
5031 actual = _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], lodashStable.isEqual);
5045 … return lodashStable.map(_.differenceWith(array, other, lodashStable.eq), lodashStable.toString);
5060 assert.strictEqual(_.divide(6, 4), 1.5);
5061 assert.strictEqual(_.divide(-6, 4), -1.5);
5062 assert.strictEqual(_.divide(-6, -4), 1.5);
5068 assert.strictEqual(_.divide('6', '4'), 1.5);
5069 assert.deepEqual(_.divide('x', 'y'), NaN);
5083 assert.deepEqual(_.drop(array, 2), [3]);
5094 return _.drop(array, n);
5104 assert.deepEqual(_.drop(array, n), array);
5112 assert.deepEqual(_.drop(array, n), []);
5119 assert.deepEqual(_.drop(array, 1.6), [2, 3]);
5122 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
5126 actual = lodashStable.map(array, _.drop);
5138 actual = _(array).drop(2).drop().value();
5142 actual = _(array).filter(predicate).drop(2).drop().value();
5144 assert.deepEqual(actual, _.drop(_.drop(_.filter(array, predicate), 2)));
5146 actual = _(array).drop(2).dropRight().drop().dropRight(2).value();
5147 assert.deepEqual(actual, _.dropRight(_.drop(_.dropRight(_.drop(array, 2))), 2));
5151 actual = _(array).drop().filter(predicate).drop(2).dropRight().drop().dropRight(2).value();
5153 …assert.deepEqual(actual, _.dropRight(_.drop(_.dropRight(_.drop(_.filter(_.drop(array), predicate),…
5171 assert.deepEqual(_.dropRight(array, 2), [1]);
5182 return _.dropRight(array, n);
5192 assert.deepEqual(_.dropRight(array, n), array);
5200 assert.deepEqual(_.dropRight(array, n), []);
5207 assert.deepEqual(_.dropRight(array, 1.6), [1, 2]);
5210 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
5214 actual = lodashStable.map(array, _.dropRight);
5226 actual = _(array).dropRight(2).dropRight().value();
5230 actual = _(array).filter(predicate).dropRight(2).dropRight().value();
5232 assert.deepEqual(actual, _.dropRight(_.dropRight(_.filter(array, predicate), 2)));
5234 actual = _(array).dropRight(2).drop().dropRight().drop(2).value();
5235 assert.deepEqual(actual, _.drop(_.dropRight(_.drop(_.dropRight(array, 2))), 2));
5239 … actual = _(array).dropRight().filter(predicate).dropRight(2).drop().dropRight().drop(2).value();
5241 …assert.deepEqual(actual, _.drop(_.dropRight(_.drop(_.dropRight(_.filter(_.dropRight(array), predic…
5265 var actual = _.dropRightWhile(array, function(n) {
5277 _.dropRightWhile(array, function() {
5284 QUnit.test('should work with `_.matches` shorthands', function(assert) {
5287 assert.deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2));
5290 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
5293 assert.deepEqual(_.dropRightWhile(objects, ['b', 2]), objects.slice(0, 2));
5296 QUnit.test('should work with `_.property` shorthands', function(assert) {
5299 assert.deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1));
5306 var wrapped = _(array).dropRightWhile(function(n) {
5310 assert.ok(wrapped instanceof _);
5335 var actual = _.dropWhile(array, function(n) {
5347 _.dropWhile(array, function() {
5354 QUnit.test('should work with `_.matches` shorthands', function(assert) {
5357 assert.deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1));
5360 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
5363 assert.deepEqual(_.dropWhile(objects, ['b', 2]), objects.slice(1));
5366 QUnit.test('should work with `_.property` shorthands', function(assert) {
5369 assert.deepEqual(_.dropWhile(objects, 'b'), objects.slice(2));
5378 expected = _.dropWhile(array, predicate),
5379 wrapped = _(array).dropWhile(predicate);
5383 assert.strictEqual(wrapped.last(), _.last(expected));
5396 var actual = _(array)
5420 assert.strictEqual(_.endsWith(string, 'c'), true);
5426 assert.strictEqual(_.endsWith(string, 'b'), false);
5432 assert.strictEqual(_.endsWith(string, 'b', 2), true);
5439 assert.strictEqual(_.endsWith(string, 'c', position), true);
5449 return _.endsWith(string, position === undefined ? 'c' : '', position);
5460 return !_.endsWith(string, chr, position);
5462 assert.strictEqual(_.endsWith(string, '', position), true);
5469 assert.strictEqual(_.endsWith(string, 'ab', 2.2), true);
5481 assert.strictEqual(_.eq(), true);
5482 assert.strictEqual(_.eq(undefined), true);
5483 assert.strictEqual(_.eq(0, -0), true);
5484 assert.strictEqual(_.eq(NaN, NaN), true);
5485 assert.strictEqual(_.eq(1, 1), true);
5487 assert.strictEqual(_.eq(null, undefined), false);
5488 assert.strictEqual(_.eq(1, Object(1)), false);
5489 assert.strictEqual(_.eq(1, '1'), false);
5490 assert.strictEqual(_.eq(1, '1'), false);
5493 assert.strictEqual(_.eq(object, object), true);
5494 assert.strictEqual(_.eq(object, { 'a': 1 }), false);
5512 assert.strictEqual(_.escape(unescaped), escaped);
5518 assert.strictEqual(_.escape('abc'), 'abc');
5521 QUnit.test('should escape the same characters unescaped by `_.unescape`', function(assert) {
5524 assert.strictEqual(_.escape(_.unescape(escaped)), escaped);
5531 assert.strictEqual(_.escape(chr), chr);
5547 assert.strictEqual(_.escapeRegExp(unescaped + unescaped), escaped + escaped);
5553 assert.strictEqual(_.escapeRegExp('abc'), 'abc');
5563 return index ? _.escapeRegExp(value) : _.escapeRegExp();
5588 return _.every(value, identity);
5600 assert.strictEqual(_.every([true, null, true], function(value) {
5611 assert.strictEqual(_.every([undefined, undefined, undefined], identity), false);
5614 QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
5622 return index ? _.every(array, value) : _.every(array);
5630 return index ? _.every(array, value) : _.every(array);
5636 QUnit.test('should work with `_.property` shorthands', function(assert) {
5640 assert.strictEqual(_.every(objects, 'a'), false);
5641 assert.strictEqual(_.every(objects, 'b'), true);
5644 QUnit.test('should work with `_.matches` shorthands', function(assert) {
5648 assert.strictEqual(_.every(objects, { 'a': 0 }), true);
5649 assert.strictEqual(_.every(objects, { 'b': 1 }), false);
5652 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
5655 var actual = lodashStable.map([[1]], _.every);
5665 var func = _[methodName],
5668 …QUnit.test('`_.' + methodName + '` should ' + (isStrict ? '' : 'not ') + 'throw strict mode errors…
5692 assert.deepEqual(_.fill(array, 'a'), ['a', 'a', 'a']);
5699 actual = _.fill(array);
5711 assert.deepEqual(_.fill(array, 'a', 1), [1, 'a', 'a']);
5719 assert.deepEqual(_.fill(array, 'a', start), [1, 2, 3]);
5730 return _.fill(array, 'a', start);
5740 assert.deepEqual(_.fill(array, 'a', -1), [1, 2, 'a']);
5748 assert.deepEqual(_.fill(array, 'a', start), ['a', 'a', 'a']);
5757 assert.deepEqual(_.fill(array, 'a', start, 2), [1, 2, 3]);
5765 assert.deepEqual(_.fill(array, 'a', 0, 1), ['a', 2, 3]);
5773 assert.deepEqual(_.fill(array, 'a', 0, end), ['a', 'a', 'a']);
5786 return _.fill(array, 'a', 0, end);
5796 assert.deepEqual(_.fill(array, 'a', 0, -1), ['a', 'a', 3]);
5804 assert.deepEqual(_.fill(array, 'a', 0, end), [1, 2, 3]);
5815 return _.fill.apply(_, [array, 'a'].concat(pos));
5821 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
5825 actual = lodashStable.map(array, _.fill);
5835 wrapped = _(array).fill('a'),
5838 assert.ok(wrapped instanceof _);
5858 assert.deepEqual(_.filter(array, isEven), [2]);
5868 func = _[methodName];
5885 QUnit.test('`_.' + methodName + '` should return the found value', function(assert) {
5891 …QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` if value is not found', fun…
5897 QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
5903 …QUnit.test('`_.' + methodName + '` should work with `_.matchesProperty` shorthands', function(asse…
5909 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
5915 …QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` for empty collections', fun…
5930 …QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', fun…
5943 assert.strictEqual(_(array)[methodName](), expected);
5950 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
5954 assert.ok(_(array).chain()[methodName]() instanceof _);
5961 …QUnit.test('`_.' + methodName + '` should not execute immediately when explicitly chaining', funct…
5965 var wrapped = _(array).chain()[methodName]();
5973 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
5982 wrapped = _(array).filter(isEven);
5993 _.each(['find', 'findIndex', 'findLast', 'findLastIndex'], function(methodName) {
5994 var func = _[methodName];
5996 …QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments for arrays', funct…
6010 _.each(['find', 'findKey', 'findLast', 'findLastKey'], function(methodName) {
6011 var func = _[methodName];
6013 …QUnit.test('`_.' + methodName + '` should work with an object for `collection`', function(assert) {
6030 …QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments for objects', func…
6051 QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
6060 actual = _(array).map(iteratee)[methodName](predicate);
6077 var func = _[methodName],
6088 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a positive `fromIndex`', funct…
6104 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a `fromIndex` >= `length`', fu…
6125 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and treat falsey `fromIndex` value…
6137 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and coerce `fromIndex` to an integ…
6155 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a negative `fromIndex`', funct…
6171 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a negative `fromIndex` <= `-le…
6192 func = _[methodName],
6195 …QUnit.test('`_.' + methodName + '` should return the index of the first matched value', function(a…
6201 QUnit.test('`_.' + methodName + '` should work with a positive `fromIndex`', function(assert) {
6207 … QUnit.test('`_.' + methodName + '` should work with a `fromIndex` >= `length`', function(assert) {
6224 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex`', function(assert) {
6230 …QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex` <= `-length`', function…
6243 …QUnit.test('`_.' + methodName + '` should treat falsey `fromIndex` values as `0`', function(assert…
6255 QUnit.test('`_.' + methodName + '` should coerce `fromIndex` to an integer', function(assert) {
6285 _.findLast(collection, resolve(values[1]), 1),
6286 _.findLast(collection, resolve(values[2]), 1)
6301 _.findLast(collection, resolve(1), fromIndex),
6302 _.findLast(collection, resolve(undefined), fromIndex),
6303 _.findLast(collection, resolve(''), fromIndex)
6318 return _.findLast(collection, resolve(values[3]), fromIndex);
6334 _.findLast(collection, resolve(values[0]), 0.1),
6335 _.findLast(collection, resolve(values[0]), NaN),
6336 _.findLast(collection, resolve(values[2]), '1')
6351 _.findLast(collection, resolve(values[1]), -2),
6352 _.findLast(collection, resolve(values[2]), -2)
6365 return _.findLast(collection, resolve(values[0]), fromIndex);
6385 var flipped = _.flip(fn);
6400 assert.deepEqual(_.flatMapDepth(array, identity), [1, 2, [3, [4]], 5]);
6403 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
6410 return index ? _.flatMapDepth(array, value) : _.flatMapDepth(array);
6420 assert.deepEqual(_.flatMapDepth(array, identity, depth), [1, [2, [3, [4]], 5]]);
6427 assert.deepEqual(_.flatMapDepth(array, identity, 2.2), [1, 2, 3, [4], 5]);
6436 var func = _[methodName],
6443 …QUnit.test('`_.' + methodName + '` should map values in `array` to a new flattened array', functio…
6452 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
6459 …QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', fu…
6471 …QUnit.test('`_.' + methodName + '` should use `_.identity` when `iteratee` is nullish', function(a…
6488 QUnit.test('`_.' + methodName + '` should accept a falsey `collection`', function(assert) {
6502 …QUnit.test('`_.' + methodName + '` should treat number values for `collection` as empty', function…
6508 …QUnit.test('`_.' + methodName + '` should work with objects with non-number length properties', fu…
6526 assert.deepEqual(_.flattenDepth(array), [1, 2, [3, [4]], 5]);
6533 assert.deepEqual(_.flattenDepth(array, depth), [1, [2, [3, [4]], 5]]);
6540 assert.deepEqual(_.flattenDepth(array, 2.2), [1, 2, 3, [4], 5]);
6557 assert.deepEqual(_.flatten(array), [1, 2, 3, args]);
6558 assert.deepEqual(_.flattenDeep(array), [1, 2, 3, 1, 2, 3]);
6559 assert.deepEqual(_.flattenDepth(array, 2), [1, 2, 3, 1, 2, 3]);
6571 var actual = _[methodName](array);
6588 return _[methodName](array);
6604 var func = _.flatten;
6606 func = _.flattenDeep;
6608 func = _.flattenDepth;
6622 assert.deepEqual(_.flatten(array), [[], [], [[[]]]]);
6623 assert.deepEqual(_.flattenDeep(array), []);
6624 assert.deepEqual(_.flattenDepth(array, 2), [[[]]]);
6630 assert.deepEqual(_.flatten(array), [1, 2, [3, [4]], 5]);
6631 assert.deepEqual(_.flattenDeep(array), [1, 2, 3, 4, 5]);
6632 assert.deepEqual(_.flattenDepth(array, 2), [1, 2, 3, [4], 5]);
6641 assert.deepEqual(_.flatten(nonArray), expected);
6642 assert.deepEqual(_.flattenDeep(nonArray), expected);
6643 assert.deepEqual(_.flattenDepth(nonArray, 2), expected);
6650 var wrapped = _(array),
6653 assert.ok(actual instanceof _);
6658 assert.ok(actual instanceof _);
6663 assert.ok(actual instanceof _);
6677 var func = _[methodName],
6680 …QUnit.test('`_.' + methodName + '` should supply each function with the return value of the previo…
6689 QUnit.test('`_.' + methodName + '` should return a new function', function(assert) {
6695 …QUnit.test('`_.' + methodName + '` should return an identity function when no arguments are given'…
6698 _.times(2, function(index) {
6710 …QUnit.test('`_.' + methodName + '` should work with a curried function and `_.head`', function(ass…
6713 var curried = _.curry(identity);
6716 ? func(_.head, curried)
6717 : func(curried, _.head);
6722 QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
6732 var filter1 = _.filter,
6733 filter2 = _.curry(_.rearg(_.ary(_.filter, 2), 1, 0), 2),
6734 filter3 = (_.filter = index ? filter2 : filter1, filter2(predicate));
6736 var map1 = _.map,
6737 map2 = _.curry(_.rearg(_.ary(_.map, 2), 1, 0), 2),
6738 map3 = (_.map = index ? map2 : map1, map2(iteratee));
6740 var take1 = _.take,
6741 take2 = _.curry(_.rearg(_.ary(_.take, 2), 1, 0), 2),
6742 take3 = (_.take = index ? take2 : take1, take2(2));
6745 ? func(map3, filter3, _.compact, take3)
6746 : func(take3, _.compact, filter3, map3);
6758 _.filter = filter1;
6759 _.map = map1;
6760 _.take = take1;
6764 …QUnit.test('`_.' + methodName + '` should work with curried functions with placeholders', function…
6767 var curried = _.curry(_.ary(_.map, 2), 2),
6772 ? func(getProp, _.uniq)
6773 : func(_.uniq, getProp);
6778 …QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
6782 var wrapped = _(noop)[methodName]();
6783 assert.ok(wrapped instanceof _);
6799 assert.strictEqual(_.each, _.forEach);
6811 assert.strictEqual(_.eachRight, _.forEachRight);
6820 var func = _[methodName];
6822 …QUnit.test('`_.' + methodName + '` iterates over inherited string keyed properties', function(asse…
6841 var func = _[methodName];
6843 QUnit.test('`_.' + methodName + '` should iterate over `length` properties', function(assert) {
6980 func = _[methodName],
6986 … QUnit.test('`_.' + methodName + '` should provide correct iteratee arguments', function(assert) {
7014 QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
7055 func = _[methodName],
7060 …QUnit.test('`_.' + methodName + '` should not iterate custom properties on arrays', function(asser…
7082 …QUnit.test('`_.' + methodName + '` should return a wrapped value when implicitly chaining', functi…
7086 var wrapped = _(array)[methodName](noop);
7087 assert.ok(wrapped instanceof _);
7098 …QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', fun…
7102 var actual = _(array)[methodName](noop);
7103 assert.notOk(actual instanceof _);
7110 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
7114 var wrapped = _(array).chain(),
7117 assert.ok(actual instanceof _);
7127 var func = _[methodName];
7129 …QUnit.test('`_.' + methodName + '` iterates over own string keyed properties of objects', function…
7150 func = _[methodName];
7152 QUnit.test('`_.' + methodName + '` should return the collection', function(assert) {
7165 var func = _[methodName];
7167 …QUnit.test('`_.' + methodName + '` should use `isArrayLike` to determine whether a value is array-…
7198 var func = _[methodName],
7203 QUnit.test('`_.' + methodName + '` should ignore changes to `length`', function(assert) {
7226 var func = _[methodName],
7231 … QUnit.test('`_.' + methodName + '` should ignore added `object` properties', function(assert) {
7259 var func = _[methodName],
7263 QUnit.test('`_.' + methodName + '` should coerce primitives to objects', function(assert) {
7279 …QUnit.test('`_.' + methodName + '` should assign own ' + (isAssign ? '' : 'and inherited ') + 'str…
7291 … QUnit.test('`_.' + methodName + '` should not skip a trailing function source', function(assert) {
7300 QUnit.test('`_.' + methodName + '` should not error on nullish sources', function(assert) {
7310 …QUnit.test('`_.' + methodName + '` should create an object when `object` is nullish', function(ass…
7331 …QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', functi…
7346 …QUnit.test('`_.' + methodName + '` should not return the existing wrapped value when chaining', fu…
7350 var wrapped = _({ 'a': 1 }),
7362 var func = _[methodName];
7364 QUnit.test('`_.' + methodName + '` should not treat `object` as `source`', function(assert) {
7371 assert.notOk(_.has(actual, 'a'));
7376 var func = _[methodName];
7378 …QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destination…
7399 var func = _[methodName],
7402 …QUnit.test('`_.' + methodName + '` should provide correct `customizer` arguments', function(assert…
7445 …QUnit.test('`_.' + methodName + '` should not treat the second argument as a `customizer` callback…
7464 var func = _[methodName];
7466 QUnit.test('`_.' + methodName + '` can exit early when iterating arrays', function(assert) {
7485 QUnit.test('`_.' + methodName + '` can exit early when iterating objects', function(assert) {
7521 assert.deepEqual(_.difference(largeArray, largeArray), []);
7522 assert.deepEqual(_.intersection(largeArray, largeArray), expected);
7523 assert.deepEqual(_.uniq(largeArray), expected);
7524 assert.deepEqual(_.without.apply(_, [largeArray].concat(largeArray)), []);
7544 var result = _[methodName]({}, source);
7550 actual = _.groupBy([{ 'a': '__proto__' }], 'a');
7558 _.merge({}, JSON.parse('{"__proto__":{"a":1}}'));
7572 _.merge({}, { 'toString': { 'constructor': { 'prototype': { 'a': 1 } } } });
7579 _.merge({}, { 'constructor': { 'prototype': { 'a': 1 } } });
7590 _.merge({}, { 'constructor': { 'a': 1 } });
7609 actual = _.fromPairs(array);
7621 return index ? _.fromPairs(array) : _.fromPairs();
7631 var actual = _.fromPairs([['a.b', 1]]);
7635 QUnit.test('should support consuming the return value of `_.toPairs`', function(assert) {
7639 assert.deepEqual(_.fromPairs(_.toPairs(object)), object);
7650 var actual = _(array).fromPairs().map(square).filter(isEven).take().value();
7652 assert.deepEqual(actual, _.take(_.filter(_.map(_.fromPairs(array), square), isEven)));
7669 actual = _.functions(object).sort();
7683 assert.deepEqual(_.functions(new Foo), ['a']);
7697 var actual = _.groupBy(array, Math.floor);
7701 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
7709 return index ? _.groupBy(array, value) : _.groupBy(array);
7715 QUnit.test('should work with `_.property` shorthands', function(assert) {
7718 var actual = _.groupBy(['one', 'two', 'three'], 'length');
7725 var actual = _.groupBy(array, function(n) {
7742 assert.deepEqual(_.groupBy(array, 0), { '1': [[1, 'a']], '2': [[2, 'a'], [2, 'b']] });
7743 assert.deepEqual(_.groupBy(array, 1), { 'a': [[1, 'a'], [2, 'a']], 'b': [[2, 'b']] });
7749 var actual = _.groupBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
7764 actual = _(array).groupBy().map(iteratee).filter(predicate).take().value();
7766 …assert.deepEqual(actual, _.take(_.filter(lodashStable.map(_.groupBy(array), iteratee), predicate))…
7782 assert.strictEqual(_.gt(3, 1), true);
7783 assert.strictEqual(_.gt('def', 'abc'), true);
7789 assert.strictEqual(_.gt(1, 3), false);
7790 assert.strictEqual(_.gt(3, 3), false);
7791 assert.strictEqual(_.gt('abc', 'def'), false);
7792 assert.strictEqual(_.gt('def', 'def'), false);
7804 assert.strictEqual(_.gte(3, 1), true);
7805 assert.strictEqual(_.gte(3, 3), true);
7806 assert.strictEqual(_.gte('def', 'abc'), true);
7807 assert.strictEqual(_.gte('def', 'def'), true);
7813 assert.strictEqual(_.gte(1, 3), false);
7814 assert.strictEqual(_.gte('abc', 'def'), false);
7823 var func = _[methodName],
7832 QUnit.test('`_.' + methodName + '` should check for own properties', function(assert) {
7842 …QUnit.test('`_.' + methodName + '` should not use the `hasOwnProperty` method of `object`', functi…
7849 QUnit.test('`_.' + methodName + '` should support deep paths', function(assert) {
7863 QUnit.test('`_.' + methodName + '` should coerce `path` to a string', function(assert) {
7882 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
7888 QUnit.test('`_.' + methodName + '` should work with a non-string `path`', function(assert) {
7898 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
7912 QUnit.test('`_.' + methodName + '` should work with a symbol `path`', function(assert) {
7937 QUnit.test('`_.' + methodName + '` should check for a key over a path', function(assert) {
7947 …QUnit.test('`_.' + methodName + '` should return `true` for indexes of sparse values', function(as…
7960 …QUnit.test('`_.' + methodName + '` should return `true` for indexes of sparse values with deep pat…
7975 …QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for inherite…
7986 …QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for nested i…
7997 …QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(asser…
8012 …QUnit.test('`_.' + methodName + '` should return `false` for deep paths when `object` is nullish',…
8027 …QUnit.test('`_.' + methodName + '` should return `false` for nullish values of nested objects', fu…
8043 …QUnit.test('`_.' + methodName + '` should return `false` over sparse values of deep paths', functi…
8069 assert.strictEqual(_.head(array), 1);
8076 assert.strictEqual(_.head([]), undefined);
8080 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
8084 actual = lodashStable.map(array, _.head);
8092 assert.strictEqual(_.first, _.head);
8099 var wrapped = _(array);
8112 var wrapped = _(array).chain();
8113 assert.ok(wrapped.head() instanceof _);
8114 assert.ok(wrapped.first() instanceof _);
8125 var wrapped = _(array).chain();
8144 actual = _(array).filter(isEven)[methodName]();
8146 assert.strictEqual(actual, _[methodName](_.filter(array, isEven)));
8165 assert.strictEqual(_.identity(object), object);
8184 assert.strictEqual(_.includes(collection, 3), true);
8190 assert.strictEqual(_.includes(collection, 5), false);
8196 assert.strictEqual(_.includes(collection, 2, 1.2), true);
8203 assert.strictEqual(_(collection).includes(3), true);
8214 assert.ok(_(collection).chain().includes(3) instanceof _);
8230 assert.strictEqual(_.includes(collection, 'bc'), true);
8231 assert.strictEqual(_.includes(collection, 'd'), false);
8242 return _.includes(value);
8262 _.includes(string, 1, fromIndex),
8263 _.includes(string, undefined, fromIndex),
8264 _.includes(string, '', fromIndex)
8274 assert.strictEqual(_.includes([1, NaN, 3], NaN), true);
8280 assert.strictEqual(_.includes([-0], 0), true);
8281 assert.strictEqual(_.includes([0], -0), true);
8284 QUnit.test('should work as an iteratee for methods like `_.every`', function(assert) {
8290 assert.ok(lodashStable.every(values, lodashStable.partial(_.includes, array)));
8308 return index ? _.initial(array) : _.initial();
8318 assert.deepEqual(_.initial(array), [1, 2]);
8324 assert.deepEqual(_.initial([]), []);
8327 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
8331 actual = lodashStable.map(array, _.initial);
8343 var actual = _(array).initial().filter(function(value) {
8350 assert.deepEqual(values, _.initial(array));
8354 actual = _(array).filter(function(value) {
8361 assert.deepEqual(actual, _.initial(lodashStable.filter(array, isEven)));
8378 assert.strictEqual(_.inRange(3, 5), true);
8379 assert.strictEqual(_.inRange(5, 5), false);
8380 assert.strictEqual(_.inRange(6, 5), false);
8386 assert.strictEqual(_.inRange(1, 1, 5), true);
8387 assert.strictEqual(_.inRange(3, 1, 5), true);
8388 assert.strictEqual(_.inRange(0, 1, 5), false);
8389 assert.strictEqual(_.inRange(5, 1, 5), false);
8397 assert.strictEqual(_.inRange(0, value), false);
8398 assert.strictEqual(_.inRange(0, value, 1), true);
8400 assert.strictEqual(_.inRange(0), false);
8408 assert.strictEqual(_.inRange(2, 5, 1), true);
8409 assert.strictEqual(_.inRange(-3, -2, -6), true);
8415 assert.strictEqual(_.inRange(0.5, 5), true);
8416 assert.strictEqual(_.inRange(1.2, 1, 5), true);
8417 assert.strictEqual(_.inRange(5.2, 5), false);
8418 assert.strictEqual(_.inRange(0.5, 1, 5), false);
8425 _.inRange(0, '1'),
8426 _.inRange(0, '0', 1),
8427 _.inRange(0, 0, '1'),
8428 _.inRange(0, NaN, 1),
8429 _.inRange(-1, -1, NaN)
8441 var func = _[methodName];
8443 …QUnit.test('`_.' + methodName + '` should return the intersection of two arrays', function(assert)…
8450 …QUnit.test('`_.' + methodName + '` should return the intersection of multiple arrays', function(as…
8457 QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
8464 QUnit.test('`_.' + methodName + '` should work with a single array', function(assert) {
8471 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
8481 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
8494 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
8501 …QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert)…
8515 QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
8522 QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
8532 …QUnit.test('`_.' + methodName + '` should treat values that are not arrays or `arguments` objects …
8541 …QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
8545 var wrapped = _([1, 3, 2])[methodName]([5, 2, 1, 4]);
8546 assert.ok(wrapped instanceof _);
8563 var actual = _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
8566 actual = _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
8575 _.intersectionBy([2.1, 1.2], [2.3, 3.4], function() {
8593 actual = _.intersectionWith(objects, others, lodashStable.isEqual);
8607 … return lodashStable.map(_.intersectionWith(array, other, lodashStable.eq), lodashStable.toString);
8623 actual = _.invert(object);
8626 assert.deepEqual(_.invert(actual), { 'a': '1', 'b': '2' });
8633 assert.deepEqual(_.invert(object), { 'hasOwnProperty': 'a', 'constructor': 'b' });
8640 assert.deepEqual(_.invert(object), { 'a': '0', 'b': '1', '2': 'length' });
8648 wrapped = _(object).invert();
8650 assert.ok(wrapped instanceof _);
8671 var actual = _.invertBy(object, function(value) {
8678 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
8685 return index ? _.invertBy(object, value) : _.invertBy(object);
8697 assert.ok(lodashStable.isEqual(_.invertBy(object), expected));
8704 var wrapped = _(object).invertBy();
8706 assert.ok(wrapped instanceof _);
8724 actual = _.invoke(object, 'a');
8733 actual = _.invoke(object, 'a', 1, 2);
8746 return _.invoke(value, 'a.b', 1, 2);
8760 return _.invoke(object, key);
8772 var actual = _.invoke(object, path, 1, 2);
8783 assert.deepEqual(_.invoke(object, path), 1);
8792 assert.strictEqual(_(object).invoke('a'), 1);
8804 assert.ok(_(object).chain().invoke('a') instanceof _);
8821 actual = _.invokeMap(array, 'toUpperCase');
8830 actual = _.invokeMap(array, 'call', null, 'a', 'b', 'c');
8840 var actual = _.invokeMap(array, function(left, right) {
8851 actual = _.invokeMap(object, 'toFixed', 1);
8859 assert.deepEqual(_.invokeMap(1), []);
8868 var actual = _.invokeMap(array, 'toUpperCase');
8886 var actual = _.invokeMap(objects, 'a');
8898 assert.deepEqual(_.invokeMap([object], path), [1]);
8907 wrapped = _(array),
8910 assert.ok(actual instanceof _);
8917 assert.ok(actual instanceof _);
8936 var actual = _(array).invokeMap('method').take(1).value();
8955 assert.strictEqual(_.isArguments(args), true);
8956 assert.strictEqual(_.isArguments(strictArgs), true);
8965 return index ? _.isArguments(value) : _.isArguments();
8970 assert.strictEqual(_.isArguments([1, 2, 3]), false);
8971 assert.strictEqual(_.isArguments(true), false);
8972 assert.strictEqual(_.isArguments(new Date), false);
8973 assert.strictEqual(_.isArguments(new Error), false);
8974 assert.strictEqual(_.isArguments(_), false);
8975 assert.strictEqual(_.isArguments(slice), false);
8976 assert.strictEqual(_.isArguments({ '0': 1, 'callee': noop, 'length': 1 }), false);
8977 assert.strictEqual(_.isArguments(1), false);
8978 assert.strictEqual(_.isArguments(/x/), false);
8979 assert.strictEqual(_.isArguments('a'), false);
8980 assert.strictEqual(_.isArguments(symbol), false);
8987 assert.strictEqual(_.isArguments(realm.arguments), true);
9003 assert.strictEqual(_.isArray([1, 2, 3]), true);
9012 return index ? _.isArray(value) : _.isArray();
9017 assert.strictEqual(_.isArray(args), false);
9018 assert.strictEqual(_.isArray(true), false);
9019 assert.strictEqual(_.isArray(new Date), false);
9020 assert.strictEqual(_.isArray(new Error), false);
9021 assert.strictEqual(_.isArray(_), false);
9022 assert.strictEqual(_.isArray(slice), false);
9023 assert.strictEqual(_.isArray({ '0': 1, 'length': 1 }), false);
9024 assert.strictEqual(_.isArray(1), false);
9025 assert.strictEqual(_.isArray(/x/), false);
9026 assert.strictEqual(_.isArray('a'), false);
9027 assert.strictEqual(_.isArray(symbol), false);
9034 assert.strictEqual(_.isArray(realm.array), true);
9051 assert.strictEqual(_.isArrayBuffer(arrayBuffer), true);
9064 return index ? _.isArrayBuffer(value) : _.isArrayBuffer();
9069 assert.strictEqual(_.isArrayBuffer(args), false);
9070 assert.strictEqual(_.isArrayBuffer([1]), false);
9071 assert.strictEqual(_.isArrayBuffer(true), false);
9072 assert.strictEqual(_.isArrayBuffer(new Date), false);
9073 assert.strictEqual(_.isArrayBuffer(new Error), false);
9074 assert.strictEqual(_.isArrayBuffer(_), false);
9075 assert.strictEqual(_.isArrayBuffer(slice), false);
9076 assert.strictEqual(_.isArrayBuffer({ 'a': 1 }), false);
9077 assert.strictEqual(_.isArrayBuffer(1), false);
9078 assert.strictEqual(_.isArrayBuffer(/x/), false);
9079 assert.strictEqual(_.isArrayBuffer('a'), false);
9080 assert.strictEqual(_.isArrayBuffer(symbol), false);
9087 assert.strictEqual(_.isArrayBuffer(realm.arrayBuffer), true);
9105 actual = lodashStable.map(values, _.isArrayLike);
9118 return index ? _.isArrayLike(value) : _.isArrayLike();
9123 assert.strictEqual(_.isArrayLike(true), false);
9124 assert.strictEqual(_.isArrayLike(new Date), false);
9125 assert.strictEqual(_.isArrayLike(new Error), false);
9126 assert.strictEqual(_.isArrayLike(_), false);
9127 assert.strictEqual(_.isArrayLike(asyncFunc), false);
9128 assert.strictEqual(_.isArrayLike(genFunc), false);
9129 assert.strictEqual(_.isArrayLike(slice), false);
9130 assert.strictEqual(_.isArrayLike({ 'a': 1 }), false);
9131 assert.strictEqual(_.isArrayLike(1), false);
9132 assert.strictEqual(_.isArrayLike(/x/), false);
9133 assert.strictEqual(_.isArrayLike(symbol), false);
9142 actual = lodashStable.map(values, _.isArrayLike);
9160 assert.strictEqual(_.isBoolean(true), true);
9161 assert.strictEqual(_.isBoolean(false), true);
9162 assert.strictEqual(_.isBoolean(Object(true)), true);
9163 assert.strictEqual(_.isBoolean(Object(false)), true);
9174 return index ? _.isBoolean(value) : _.isBoolean();
9179 assert.strictEqual(_.isBoolean(args), false);
9180 assert.strictEqual(_.isBoolean([1, 2, 3]), false);
9181 assert.strictEqual(_.isBoolean(new Date), false);
9182 assert.strictEqual(_.isBoolean(new Error), false);
9183 assert.strictEqual(_.isBoolean(_), false);
9184 assert.strictEqual(_.isBoolean(slice), false);
9185 assert.strictEqual(_.isBoolean({ 'a': 1 }), false);
9186 assert.strictEqual(_.isBoolean(1), false);
9187 assert.strictEqual(_.isBoolean(/x/), false);
9188 assert.strictEqual(_.isBoolean('a'), false);
9189 assert.strictEqual(_.isBoolean(symbol), false);
9196 assert.strictEqual(_.isBoolean(realm.boolean), true);
9213 assert.strictEqual(_.isBuffer(new Buffer(2)), true);
9226 return index ? _.isBuffer(value) : _.isBuffer();
9231 assert.strictEqual(_.isBuffer(args), false);
9232 assert.strictEqual(_.isBuffer([1]), false);
9233 assert.strictEqual(_.isBuffer(true), false);
9234 assert.strictEqual(_.isBuffer(new Date), false);
9235 assert.strictEqual(_.isBuffer(new Error), false);
9236 assert.strictEqual(_.isBuffer(_), false);
9237 assert.strictEqual(_.isBuffer(slice), false);
9238 assert.strictEqual(_.isBuffer({ 'a': 1 }), false);
9239 assert.strictEqual(_.isBuffer(1), false);
9240 assert.strictEqual(_.isBuffer(/x/), false);
9241 assert.strictEqual(_.isBuffer('a'), false);
9242 assert.strictEqual(_.isBuffer(symbol), false);
9265 assert.strictEqual(_.isDate(new Date), true);
9274 return index ? _.isDate(value) : _.isDate();
9279 assert.strictEqual(_.isDate(args), false);
9280 assert.strictEqual(_.isDate([1, 2, 3]), false);
9281 assert.strictEqual(_.isDate(true), false);
9282 assert.strictEqual(_.isDate(new Error), false);
9283 assert.strictEqual(_.isDate(_), false);
9284 assert.strictEqual(_.isDate(slice), false);
9285 assert.strictEqual(_.isDate({ 'a': 1 }), false);
9286 assert.strictEqual(_.isDate(1), false);
9287 assert.strictEqual(_.isDate(/x/), false);
9288 assert.strictEqual(_.isDate('a'), false);
9289 assert.strictEqual(_.isDate(symbol), false);
9296 assert.strictEqual(_.isDate(realm.date), true);
9313 assert.strictEqual(_.isElement(body), true);
9327 assert.strictEqual(_.isElement(new Foo), true);
9336 return index ? _.isElement(value) : _.isElement();
9341 assert.strictEqual(_.isElement(args), false);
9342 assert.strictEqual(_.isElement([1, 2, 3]), false);
9343 assert.strictEqual(_.isElement(true), false);
9344 assert.strictEqual(_.isElement(new Date), false);
9345 assert.strictEqual(_.isElement(new Error), false);
9346 assert.strictEqual(_.isElement(_), false);
9347 assert.strictEqual(_.isElement(slice), false);
9348 assert.strictEqual(_.isElement({ 'a': 1 }), false);
9349 assert.strictEqual(_.isElement(1), false);
9350 assert.strictEqual(_.isElement(/x/), false);
9351 assert.strictEqual(_.isElement('a'), false);
9352 assert.strictEqual(_.isElement(symbol), false);
9358 assert.strictEqual(_.isElement({ 'nodeType': 1 }), false);
9359 assert.strictEqual(_.isElement({ 'nodeType': Object(1) }), false);
9360 assert.strictEqual(_.isElement({ 'nodeType': true }), false);
9361 assert.strictEqual(_.isElement({ 'nodeType': [1] }), false);
9362 assert.strictEqual(_.isElement({ 'nodeType': '1' }), false);
9363 assert.strictEqual(_.isElement({ 'nodeType': '001' }), false);
9370 assert.strictEqual(_.isElement(realm.element), true);
9387 actual = lodashStable.map(empties, _.isEmpty);
9391 assert.strictEqual(_.isEmpty(true), true);
9392 assert.strictEqual(_.isEmpty(slice), true);
9393 assert.strictEqual(_.isEmpty(1), true);
9394 assert.strictEqual(_.isEmpty(NaN), true);
9395 assert.strictEqual(_.isEmpty(/x/), true);
9396 assert.strictEqual(_.isEmpty(symbol), true);
9397 assert.strictEqual(_.isEmpty(), true);
9400 assert.strictEqual(_.isEmpty(new Buffer(0)), true);
9401 assert.strictEqual(_.isEmpty(new Buffer(1)), false);
9411 assert.strictEqual(_.isEmpty([0]), false);
9412 assert.strictEqual(_.isEmpty({ 'a': 0 }), false);
9413 assert.strictEqual(_.isEmpty('a'), false);
9419 assert.strictEqual(_.isEmpty({ 'length': 0 }), false);
9425 assert.strictEqual(_.isEmpty(args), false);
9434 assert.strictEqual(_.isEmpty(Foo.prototype), true);
9437 assert.strictEqual(_.isEmpty(Foo.prototype), false);
9448 assert.strictEqual(_.isEmpty(new Foo([])), true);
9456 assert.strictEqual(_.isEmpty(map), true);
9458 assert.strictEqual(_.isEmpty(map), false);
9472 assert.strictEqual(_.isEmpty(set), true);
9474 assert.strictEqual(_.isEmpty(set), false);
9489 assert.strictEqual(_.isEmpty(new Foo), true);
9498 assert.strictEqual(_.isEmpty(new Foo), true);
9504 assert.strictEqual(_.isEmpty({ 'length': '0' }), false);
9511 assert.strictEqual(_({}).isEmpty(), true);
9522 assert.ok(_({}).chain().isEmpty() instanceof _);
9558 return _.isEqual(pair[0], pair[1]);
9570 assert.strictEqual(_.isEqual(array1, array2), true);
9575 assert.strictEqual(_.isEqual(array1, array2), true);
9584 assert.strictEqual(_.isEqual(array1, array2), true);
9589 assert.strictEqual(_.isEqual(array1, array2), true);
9594 assert.strictEqual(_.isEqual(array1, array2), false);
9599 assert.strictEqual(_.isEqual(array1, array2), false);
9616 assert.strictEqual(_.isEqual(array1, array2), true);
9624 assert.strictEqual(_.isEqual(array1, array2), true);
9629 assert.strictEqual(_.isEqual(array1, array2), true);
9637 assert.strictEqual(_.isEqual(array, Array(1)), true);
9638 assert.strictEqual(_.isEqual(array, [undefined]), true);
9639 assert.strictEqual(_.isEqual(array, Array(2)), false);
9648 assert.strictEqual(_.isEqual(object1, object2), true);
9653 assert.strictEqual(_.isEqual(object1, object2), true);
9658 assert.strictEqual(_.isEqual(object1, object2), false);
9663 assert.strictEqual(_.isEqual(object1, object2), false);
9668 assert.strictEqual(_.isEqual(object1, object2), false);
9677 assert.strictEqual(_.isEqual(object1, object2), true);
9711 assert.strictEqual(_.isEqual(object1, object2), true);
9727 assert.strictEqual(_.isEqual(new Foo, new Foo), true);
9728 assert.strictEqual(_.isEqual(new Foo, new Bar), false);
9729 assert.strictEqual(_.isEqual({ 'a': 1 }, new Foo), false);
9730 assert.strictEqual(_.isEqual({ 'a': 2 }, new Bar), false);
9736 assert.strictEqual(_.isEqual({ 'constructor': 1 }, { 'constructor': 1 }), true);
9737 assert.strictEqual(_.isEqual({ 'constructor': 1 }, { 'constructor': '1' }), false);
9738 assert.strictEqual(_.isEqual({ 'constructor': [1] }, { 'constructor': [1] }), true);
9739 assert.strictEqual(_.isEqual({ 'constructor': [1] }, { 'constructor': ['1'] }), false);
9740 assert.strictEqual(_.isEqual({ 'constructor': Object }, {}), false);
9752 assert.strictEqual(_.isEqual(array1, array2), true);
9757 assert.strictEqual(_.isEqual(array1, array2), true);
9762 assert.strictEqual(_.isEqual(array1, array2), false);
9768 assert.strictEqual(_.isEqual(array1, array2), false);
9780 assert.strictEqual(_.isEqual(array1, array2), true);
9781 assert.strictEqual(_.isEqual(array2, array3), true);
9782 assert.strictEqual(_.isEqual(array1, array3), true);
9794 assert.strictEqual(_.isEqual(object1, object2), true);
9799 assert.strictEqual(_.isEqual(object1, object2), true);
9804 assert.strictEqual(_.isEqual(object1, object2), false);
9810 assert.strictEqual(_.isEqual(object1, object2), false);
9822 assert.strictEqual(_.isEqual(object1, object2), true);
9823 assert.strictEqual(_.isEqual(object2, object3), true);
9824 assert.strictEqual(_.isEqual(object1, object3), true);
9836 assert.strictEqual(_.isEqual(array1, array2), true);
9841 assert.strictEqual(_.isEqual(array1, array2), true);
9846 assert.strictEqual(_.isEqual(array1, array2), false);
9868 assert.strictEqual(_.isEqual(object1, object2), true);
9885 assert.strictEqual(_.isEqual(object1, object2), true);
9901 assert.strictEqual(_.isEqual(object1, object2), true);
9902 assert.strictEqual(_.isEqual(new Foo, object2), false);
9908 assert.strictEqual(_.isEqual(true, Object(false)), false);
9909 assert.strictEqual(_.isEqual(Object(false), Object(0)), false);
9910 assert.strictEqual(_.isEqual(false, Object('')), false);
9911 assert.strictEqual(_.isEqual(Object(36), Object('36')), false);
9912 assert.strictEqual(_.isEqual(0, ''), false);
9913 assert.strictEqual(_.isEqual(1, true), false);
9914 assert.strictEqual(_.isEqual(1337756400000, new Date(2012, 4, 23)), false);
9915 assert.strictEqual(_.isEqual('36', 36), false);
9916 assert.strictEqual(_.isEqual(36, '36'), false);
9926 assert.strictEqual(_.isEqual(args1, args2), true);
9927 assert.strictEqual(_.isEqual(args1, args3), false);
9938 assert.strictEqual(_.isEqual(args, object), true);
9939 assert.strictEqual(_.isEqual(object, args), true);
9940 assert.strictEqual(_.isEqual(args, new Foo), false);
9941 assert.strictEqual(_.isEqual(new Foo, args), false);
9950 assert.strictEqual(_.isEqual(buffer, new Uint8Array([255]).buffer), true);
9951 assert.strictEqual(_.isEqual(buffer, new ArrayBuffer(1)), false);
9978 … return [_.isEqual(pair[0], pair[1]), _.isEqual(pair[0], pair[2]), _.isEqual(pair[2], pair[3])];
9991 assert.strictEqual(_.isEqual(buffer, new Buffer([1])), true);
9992 assert.strictEqual(_.isEqual(buffer, new Buffer([2])), false);
9993 assert.strictEqual(_.isEqual(buffer, new Uint8Array([1])), false);
10005 assert.strictEqual(_.isEqual(date, new Date(2012, 4, 23)), true);
10006 assert.strictEqual(_.isEqual(new Date('a'), new Date('b')), true);
10007 assert.strictEqual(_.isEqual(date, new Date(2013, 3, 25)), false);
10008 assert.strictEqual(_.isEqual(date, { 'getTime': lodashStable.constant(+date) }), false);
10033 … return [_.isEqual(pair[0], pair[1]), _.isEqual(pair[0], pair[2]), _.isEqual(pair[2], pair[3])];
10045 assert.strictEqual(_.isEqual(a, a), true);
10046 assert.strictEqual(_.isEqual(a, b), false);
10059 assert.strictEqual(_.isEqual(map1, map2), false);
10063 assert.strictEqual(_.isEqual(map1, map2), true);
10067 assert.strictEqual(_.isEqual(map1, map2), true);
10070 assert.strictEqual(_.isEqual(map1, map2), false);
10090 assert.strictEqual(_.isEqual(map1, map2), true);
10094 assert.strictEqual(_.isEqual(map1, map2), false);
10109 assert.strictEqual(_.isEqual(promise1, promise2), false);
10110 assert.strictEqual(_.isEqual(promise1, promise1), true);
10121 assert.strictEqual(_.isEqual(/x/gim, /x/gim), true);
10122 assert.strictEqual(_.isEqual(/x/gim, /x/mgi), true);
10123 assert.strictEqual(_.isEqual(/x/gi, /x/g), false);
10124 assert.strictEqual(_.isEqual(/x/, /y/), false);
10125 …assert.strictEqual(_.isEqual(/x/g, { 'global': true, 'ignoreCase': false, 'multiline': false, 'sou…
10138 assert.strictEqual(_.isEqual(set1, set2), false);
10142 assert.strictEqual(_.isEqual(set1, set2), true);
10146 assert.strictEqual(_.isEqual(set1, set2), true);
10149 assert.strictEqual(_.isEqual(set1, set2), false);
10169 assert.strictEqual(_.isEqual(set1, set2), true);
10173 assert.strictEqual(_.isEqual(set1, set2), false);
10197 assert.strictEqual(_.isEqual(object1, object2), true);
10200 assert.strictEqual(_.isEqual(object1, object2), false);
10204 assert.strictEqual(_.isEqual(object1, object2), false);
10229 var wrapped1 = _(vals[0]),
10230 wrapped2 = _(vals[1]),
10234 assert.strictEqual(_.isEqual(_(actual), _(true)), true);
10236 wrapped1 = _(vals[0]);
10237 wrapped2 = _(vals[2]);
10241 assert.strictEqual(_.isEqual(_(actual), _(false)), true);
10253 var object1 = _({ 'a': 1, 'b': 2 }),
10257 assert.strictEqual(_.isEqual(object1, object2), true);
10259 object1 = _({ 'a': 1, 'b': 2 });
10263 assert.strictEqual(_.isEqual(object1, object2), false);
10270 QUnit.test('should work as an iteratee for `_.every`', function(assert) {
10273 var actual = lodashStable.every([1, 1, 1], lodashStable.partial(_.isEqual, 1));
10285 assert.strictEqual(_.isEqual(element1, element2), false);
10299 assert.strictEqual(_.isEqual([1], realm.array), true);
10300 assert.strictEqual(_.isEqual([2], realm.array), false);
10301 assert.strictEqual(_.isEqual({ 'a': 1 }, realm.object), true);
10302 assert.strictEqual(_.isEqual({ 'a': 2 }, realm.object), false);
10319 return _.isEqual(object, value);
10329 assert.strictEqual(_('a').isEqual('a'), true);
10340 assert.ok(_('a').chain().isEqual('a') instanceof _);
10371 _.isEqualWith(object1, object2, function(assert) {
10384 assert.strictEqual(_.isEqualWith('a', 'a', noop), true);
10385 assert.strictEqual(_.isEqualWith(['a'], ['a'], noop), true);
10386 assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'a' }, noop), true);
10393 return _.isString(value) || undefined;
10396 assert.strictEqual(_.isEqualWith('a', 'b', customizer), true);
10397 assert.strictEqual(_.isEqualWith(['a'], ['b'], customizer), true);
10398 assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'b' }, customizer), true);
10405 return _.isString(value) ? false : undefined;
10408 assert.strictEqual(_.isEqualWith('a', 'a', customizer), false);
10409 assert.strictEqual(_.isEqualWith(['a'], ['a'], customizer), false);
10410 assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'a' }, customizer), false);
10416 var actual = _.isEqualWith('a', 'b', stubC);
10419 var values = _.without(falsey, undefined),
10424 actual.push(_.isEqualWith('a', 'a', lodashStable.constant(value)));
10434 eq = _.partial(_.isEqualWith, array),
10474 _.isEqualWith(pair[0], pair[1], function() {
10501 return _.isError(error) === true;
10510 assert.strictEqual(_.isError(new CustomError('x')), true);
10519 return index ? _.isError(value) : _.isError();
10524 assert.strictEqual(_.isError(args), false);
10525 assert.strictEqual(_.isError([1, 2, 3]), false);
10526 assert.strictEqual(_.isError(true), false);
10527 assert.strictEqual(_.isError(new Date), false);
10528 assert.strictEqual(_.isError(_), false);
10529 assert.strictEqual(_.isError(slice), false);
10530 assert.strictEqual(_.isError({ 'a': 1 }), false);
10531 assert.strictEqual(_.isError(1), false);
10532 assert.strictEqual(_.isError(/x/), false);
10533 assert.strictEqual(_.isError('a'), false);
10534 assert.strictEqual(_.isError(symbol), false);
10540 assert.strictEqual(_.isError({ 'name': 'Error', 'message': '' }), false);
10550 return _.isError(error) === true;
10571 actual = lodashStable.map(values, _.isFinite);
10581 actual = lodashStable.map(values, _.isFinite);
10591 actual = lodashStable.map(values, _.isFinite);
10595 assert.strictEqual(_.isFinite(args), false);
10596 assert.strictEqual(_.isFinite([1, 2, 3]), false);
10597 assert.strictEqual(_.isFinite(true), false);
10598 assert.strictEqual(_.isFinite(new Date), false);
10599 assert.strictEqual(_.isFinite(new Error), false);
10600 assert.strictEqual(_.isFinite({ 'a': 1 }), false);
10601 assert.strictEqual(_.isFinite(/x/), false);
10602 assert.strictEqual(_.isFinite('a'), false);
10603 assert.strictEqual(_.isFinite(symbol), false);
10611 actual = lodashStable.map(values, _.isFinite);
10625 assert.strictEqual(_.isFunction(_), true);
10626 assert.strictEqual(_.isFunction(slice), true);
10632 assert.strictEqual(_.isFunction(asyncFunc), typeof asyncFunc == 'function');
10638 assert.strictEqual(_.isFunction(genFunc), typeof genFunc == 'function');
10645 assert.strictEqual(_.isFunction(Proxy), true);
10660 return _.isFunction(root[type]);
10672 return index ? _.isFunction(value) : _.isFunction();
10677 assert.strictEqual(_.isFunction(args), false);
10678 assert.strictEqual(_.isFunction([1, 2, 3]), false);
10679 assert.strictEqual(_.isFunction(true), false);
10680 assert.strictEqual(_.isFunction(new Date), false);
10681 assert.strictEqual(_.isFunction(new Error), false);
10682 assert.strictEqual(_.isFunction({ 'a': 1 }), false);
10683 assert.strictEqual(_.isFunction(1), false);
10684 assert.strictEqual(_.isFunction(/x/), false);
10685 assert.strictEqual(_.isFunction('a'), false);
10686 assert.strictEqual(_.isFunction(symbol), false);
10689 assert.strictEqual(_.isFunction(document.getElementsByTagName('body')), false);
10700 assert.strictEqual(_.isFunction(realm.function), true);
10713 var func = _[methodName],
10716 QUnit.test('`_.' + methodName + '` should return `true` for integer values', function(assert) {
10778 actual = lodashStable.map(values, _.isLength);
10788 actual = lodashStable.map(values, _.isLength);
10803 assert.strictEqual(_.isMap(map), true);
10816 return index ? _.isMap(value) : _.isMap();
10821 assert.strictEqual(_.isMap(args), false);
10822 assert.strictEqual(_.isMap([1, 2, 3]), false);
10823 assert.strictEqual(_.isMap(true), false);
10824 assert.strictEqual(_.isMap(new Date), false);
10825 assert.strictEqual(_.isMap(new Error), false);
10826 assert.strictEqual(_.isMap(_), false);
10827 assert.strictEqual(_.isMap(slice), false);
10828 assert.strictEqual(_.isMap({ 'a': 1 }), false);
10829 assert.strictEqual(_.isMap(1), false);
10830 assert.strictEqual(_.isMap(/x/), false);
10831 assert.strictEqual(_.isMap('a'), false);
10832 assert.strictEqual(_.isMap(symbol), false);
10833 assert.strictEqual(_.isMap(weakMap), false);
10843 return _.isMap({ 'constructor': value });
10853 assert.strictEqual(_.isMap(realm.map), true);
10887 _.isMatchWith(object1, object2, function(assert) {
10897 assert.strictEqual(_.isMatchWith({ 'a': 1 }, { 'a': 1 }, noop), true);
10904 return _.isString(value) || undefined;
10907 assert.strictEqual(_.isMatchWith(['a'], ['b'], customizer), true);
10908 assert.strictEqual(_.isMatchWith({ '0': 'a' }, { '0': 'b' }, customizer), true);
10915 return _.isString(value) ? false : undefined;
10918 assert.strictEqual(_.isMatchWith(['a'], ['a'], customizer), false);
10919 assert.strictEqual(_.isMatchWith({ '0': 'a' }, { '0': 'a' }, customizer), false);
10926 actual = _.isMatchWith(object, { 'a': 1 }, stubA);
10934 actual.push(_.isMatchWith(object, { 'a': 2 }, lodashStable.constant(value)));
10945 _.isMatchWith({ 'a': 1 }, { 'a': 1 }, function() {
10946 actual = _.last(arguments);
10959 matches = _.partial(_.isMatchWith, object),
11001 _.isMatchWith({ 'a': pair[0] }, { 'a': pair[1] }, function() {
11022 assert.strictEqual(_.isNaN(NaN), true);
11023 assert.strictEqual(_.isNaN(Object(NaN)), true);
11034 return index ? _.isNaN(value) : _.isNaN();
11039 assert.strictEqual(_.isNaN(args), false);
11040 assert.strictEqual(_.isNaN([1, 2, 3]), false);
11041 assert.strictEqual(_.isNaN(true), false);
11042 assert.strictEqual(_.isNaN(new Date), false);
11043 assert.strictEqual(_.isNaN(new Error), false);
11044 assert.strictEqual(_.isNaN(_), false);
11045 assert.strictEqual(_.isNaN(slice), false);
11046 assert.strictEqual(_.isNaN({ 'a': 1 }), false);
11047 assert.strictEqual(_.isNaN(1), false);
11048 assert.strictEqual(_.isNaN(Object(1)), false);
11049 assert.strictEqual(_.isNaN(/x/), false);
11050 assert.strictEqual(_.isNaN('a'), false);
11051 assert.strictEqual(_.isNaN(symbol), false);
11058 assert.strictEqual(_.isNaN(realm.nan), true);
11076 actual = lodashStable.map(values, _.isNative);
11087 return index ? _.isNative(value) : _.isNative();
11092 assert.strictEqual(_.isNative(args), false);
11093 assert.strictEqual(_.isNative([1, 2, 3]), false);
11094 assert.strictEqual(_.isNative(true), false);
11095 assert.strictEqual(_.isNative(new Date), false);
11096 assert.strictEqual(_.isNative(new Error), false);
11097 assert.strictEqual(_.isNative(_), false);
11098 assert.strictEqual(_.isNative({ 'a': 1 }), false);
11099 assert.strictEqual(_.isNative(1), false);
11100 assert.strictEqual(_.isNative(/x/), false);
11101 assert.strictEqual(_.isNative('a'), false);
11102 assert.strictEqual(_.isNative(symbol), false);
11109 assert.strictEqual(_.isNative(realm.element.cloneNode), true);
11115 assert.strictEqual(_.isNative(realm.object.valueOf), true);
11126 var lodash = _.runInContext({
11140 if (!amd && _._baseEach) {
11173 assert.strictEqual(_.isNil(null), true);
11174 assert.strictEqual(_.isNil(), true);
11175 assert.strictEqual(_.isNil(undefined), true);
11186 return index ? _.isNil(value) : _.isNil();
11191 assert.strictEqual(_.isNil(args), false);
11192 assert.strictEqual(_.isNil([1, 2, 3]), false);
11193 assert.strictEqual(_.isNil(true), false);
11194 assert.strictEqual(_.isNil(new Date), false);
11195 assert.strictEqual(_.isNil(new Error), false);
11196 assert.strictEqual(_.isNil(_), false);
11197 assert.strictEqual(_.isNil(slice), false);
11198 assert.strictEqual(_.isNil({ 'a': 1 }), false);
11199 assert.strictEqual(_.isNil(1), false);
11200 assert.strictEqual(_.isNil(/x/), false);
11201 assert.strictEqual(_.isNil('a'), false);
11204 assert.strictEqual(_.isNil(symbol), false);
11215 assert.strictEqual(_.isNil(realm.null), true);
11216 assert.strictEqual(_.isNil(realm.undefined), true);
11232 assert.strictEqual(_.isNull(null), true);
11243 return index ? _.isNull(value) : _.isNull();
11248 assert.strictEqual(_.isNull(args), false);
11249 assert.strictEqual(_.isNull([1, 2, 3]), false);
11250 assert.strictEqual(_.isNull(true), false);
11251 assert.strictEqual(_.isNull(new Date), false);
11252 assert.strictEqual(_.isNull(new Error), false);
11253 assert.strictEqual(_.isNull(_), false);
11254 assert.strictEqual(_.isNull(slice), false);
11255 assert.strictEqual(_.isNull({ 'a': 1 }), false);
11256 assert.strictEqual(_.isNull(1), false);
11257 assert.strictEqual(_.isNull(/x/), false);
11258 assert.strictEqual(_.isNull('a'), false);
11259 assert.strictEqual(_.isNull(symbol), false);
11266 assert.strictEqual(_.isNull(realm.null), true);
11282 assert.strictEqual(_.isNumber(0), true);
11283 assert.strictEqual(_.isNumber(Object(0)), true);
11284 assert.strictEqual(_.isNumber(NaN), true);
11295 return index ? _.isNumber(value) : _.isNumber();
11300 assert.strictEqual(_.isNumber(args), false);
11301 assert.strictEqual(_.isNumber([1, 2, 3]), false);
11302 assert.strictEqual(_.isNumber(true), false);
11303 assert.strictEqual(_.isNumber(new Date), false);
11304 assert.strictEqual(_.isNumber(new Error), false);
11305 assert.strictEqual(_.isNumber(_), false);
11306 assert.strictEqual(_.isNumber(slice), false);
11307 assert.strictEqual(_.isNumber({ 'a': 1 }), false);
11308 assert.strictEqual(_.isNumber(/x/), false);
11309 assert.strictEqual(_.isNumber('a'), false);
11310 assert.strictEqual(_.isNumber(symbol), false);
11317 assert.strictEqual(_.isNumber(realm.number), true);
11333 assert.strictEqual(_.isObject(args), true);
11334 assert.strictEqual(_.isObject([1, 2, 3]), true);
11335 assert.strictEqual(_.isObject(Object(false)), true);
11336 assert.strictEqual(_.isObject(new Date), true);
11337 assert.strictEqual(_.isObject(new Error), true);
11338 assert.strictEqual(_.isObject(_), true);
11339 assert.strictEqual(_.isObject(slice), true);
11340 assert.strictEqual(_.isObject({ 'a': 1 }), true);
11341 assert.strictEqual(_.isObject(Object(0)), true);
11342 assert.strictEqual(_.isObject(/x/), true);
11343 assert.strictEqual(_.isObject(Object('a')), true);
11346 assert.strictEqual(_.isObject(body), true);
11352 assert.strictEqual(_.isObject(Object(symbol)), true);
11366 return index ? _.isObject(value) : _.isObject();
11376 assert.strictEqual(_.isObject(realm.element), true);
11382 assert.strictEqual(_.isObject(realm.boolean), true);
11383 assert.strictEqual(_.isObject(realm.date), true);
11384 assert.strictEqual(_.isObject(realm.function), true);
11385 assert.strictEqual(_.isObject(realm.number), true);
11386 assert.strictEqual(_.isObject(realm.object), true);
11387 assert.strictEqual(_.isObject(realm.regexp), true);
11388 assert.strictEqual(_.isObject(realm.string), true);
11404 assert.strictEqual(_.isObjectLike(args), true);
11405 assert.strictEqual(_.isObjectLike([1, 2, 3]), true);
11406 assert.strictEqual(_.isObjectLike(Object(false)), true);
11407 assert.strictEqual(_.isObjectLike(new Date), true);
11408 assert.strictEqual(_.isObjectLike(new Error), true);
11409 assert.strictEqual(_.isObjectLike({ 'a': 1 }), true);
11410 assert.strictEqual(_.isObjectLike(Object(0)), true);
11411 assert.strictEqual(_.isObjectLike(/x/), true);
11412 assert.strictEqual(_.isObjectLike(Object('a')), true);
11418 var values = falsey.concat(true, _, slice, 1, 'a', symbol),
11422 return index ? _.isObjectLike(value) : _.isObjectLike();
11432 assert.strictEqual(_.isObjectLike(realm.boolean), true);
11433 assert.strictEqual(_.isObjectLike(realm.date), true);
11434 assert.strictEqual(_.isObjectLike(realm.number), true);
11435 assert.strictEqual(_.isObjectLike(realm.object), true);
11436 assert.strictEqual(_.isObjectLike(realm.regexp), true);
11437 assert.strictEqual(_.isObjectLike(realm.string), true);
11459 assert.strictEqual(_.isPlainObject({}), true);
11460 assert.strictEqual(_.isPlainObject({ 'a': 1 }), true);
11461 assert.strictEqual(_.isPlainObject({ 'constructor': Foo }), true);
11462 assert.strictEqual(_.isPlainObject([1, 2, 3]), false);
11463 assert.strictEqual(_.isPlainObject(new Foo(1)), false);
11470 assert.strictEqual(_.isPlainObject(object), true);
11473 assert.strictEqual(_.isPlainObject(object), true);
11479 assert.strictEqual(_.isPlainObject({ 'valueOf': 0 }), true);
11489 assert.deepEqual(_.isPlainObject(object), true);
11500 assert.strictEqual(_.isPlainObject(object), false);
11507 assert.strictEqual(_.isPlainObject(element), false);
11516 assert.strictEqual(_.isPlainObject(arguments), false);
11517 assert.strictEqual(_.isPlainObject(Error), false);
11518 assert.strictEqual(_.isPlainObject(Math), false);
11527 return index ? _.isPlainObject(value) : _.isPlainObject();
11532 assert.strictEqual(_.isPlainObject(true), false);
11533 assert.strictEqual(_.isPlainObject('a'), false);
11534 assert.strictEqual(_.isPlainObject(symbol), false);
11549 assert.deepEqual(_.isPlainObject(object), false);
11564 assert.strictEqual(_.isPlainObject(object), false);
11576 assert.strictEqual(_.isPlainObject(realm.object), true);
11592 assert.strictEqual(_.isRegExp(/x/), true);
11593 assert.strictEqual(_.isRegExp(RegExp('x')), true);
11602 return index ? _.isRegExp(value) : _.isRegExp();
11607 assert.strictEqual(_.isRegExp(args), false);
11608 assert.strictEqual(_.isRegExp([1, 2, 3]), false);
11609 assert.strictEqual(_.isRegExp(true), false);
11610 assert.strictEqual(_.isRegExp(new Date), false);
11611 assert.strictEqual(_.isRegExp(new Error), false);
11612 assert.strictEqual(_.isRegExp(_), false);
11613 assert.strictEqual(_.isRegExp(slice), false);
11614 assert.strictEqual(_.isRegExp({ 'a': 1 }), false);
11615 assert.strictEqual(_.isRegExp(1), false);
11616 assert.strictEqual(_.isRegExp('a'), false);
11617 assert.strictEqual(_.isRegExp(symbol), false);
11624 assert.strictEqual(_.isRegExp(realm.regexp), true);
11641 assert.strictEqual(_.isSet(set), true);
11654 return index ? _.isSet(value) : _.isSet();
11659 assert.strictEqual(_.isSet(args), false);
11660 assert.strictEqual(_.isSet([1, 2, 3]), false);
11661 assert.strictEqual(_.isSet(true), false);
11662 assert.strictEqual(_.isSet(new Date), false);
11663 assert.strictEqual(_.isSet(new Error), false);
11664 assert.strictEqual(_.isSet(_), false);
11665 assert.strictEqual(_.isSet(slice), false);
11666 assert.strictEqual(_.isSet({ 'a': 1 }), false);
11667 assert.strictEqual(_.isSet(1), false);
11668 assert.strictEqual(_.isSet(/x/), false);
11669 assert.strictEqual(_.isSet('a'), false);
11670 assert.strictEqual(_.isSet(symbol), false);
11671 assert.strictEqual(_.isSet(weakSet), false);
11681 return _.isSet({ 'constructor': value });
11691 assert.strictEqual(_.isSet(realm.set), true);
11707 assert.strictEqual(_.isString('a'), true);
11708 assert.strictEqual(_.isString(Object('a')), true);
11719 return index ? _.isString(value) : _.isString();
11724 assert.strictEqual(_.isString(args), false);
11725 assert.strictEqual(_.isString([1, 2, 3]), false);
11726 assert.strictEqual(_.isString(true), false);
11727 assert.strictEqual(_.isString(new Date), false);
11728 assert.strictEqual(_.isString(new Error), false);
11729 assert.strictEqual(_.isString(_), false);
11730 assert.strictEqual(_.isString(slice), false);
11731 assert.strictEqual(_.isString({ '0': 1, 'length': 1 }), false);
11732 assert.strictEqual(_.isString(1), false);
11733 assert.strictEqual(_.isString(/x/), false);
11734 assert.strictEqual(_.isString(symbol), false);
11741 assert.strictEqual(_.isString(realm.string), true);
11758 assert.strictEqual(_.isSymbol(symbol), true);
11759 assert.strictEqual(_.isSymbol(Object(symbol)), true);
11772 return index ? _.isSymbol(value) : _.isSymbol();
11777 assert.strictEqual(_.isSymbol(args), false);
11778 assert.strictEqual(_.isSymbol([1, 2, 3]), false);
11779 assert.strictEqual(_.isSymbol(true), false);
11780 assert.strictEqual(_.isSymbol(new Date), false);
11781 assert.strictEqual(_.isSymbol(new Error), false);
11782 assert.strictEqual(_.isSymbol(_), false);
11783 assert.strictEqual(_.isSymbol(slice), false);
11784 assert.strictEqual(_.isSymbol({ '0': 1, 'length': 1 }), false);
11785 assert.strictEqual(_.isSymbol(1), false);
11786 assert.strictEqual(_.isSymbol(/x/), false);
11787 assert.strictEqual(_.isSymbol('a'), false);
11794 assert.strictEqual(_.isSymbol(realm.symbol), true);
11816 return Ctor ? _.isTypedArray(new Ctor(new ArrayBuffer(8))) : false;
11828 return index ? _.isTypedArray(value) : _.isTypedArray();
11833 assert.strictEqual(_.isTypedArray(args), false);
11834 assert.strictEqual(_.isTypedArray([1, 2, 3]), false);
11835 assert.strictEqual(_.isTypedArray(true), false);
11836 assert.strictEqual(_.isTypedArray(new Date), false);
11837 assert.strictEqual(_.isTypedArray(new Error), false);
11838 assert.strictEqual(_.isTypedArray(_), false);
11839 assert.strictEqual(_.isTypedArray(slice), false);
11840 assert.strictEqual(_.isTypedArray({ 'a': 1 }), false);
11841 assert.strictEqual(_.isTypedArray(1), false);
11842 assert.strictEqual(_.isTypedArray(/x/), false);
11843 assert.strictEqual(_.isTypedArray('a'), false);
11844 assert.strictEqual(_.isTypedArray(symbol), false);
11859 return value ? _.isTypedArray(value) : false;
11878 assert.strictEqual(_.isUndefined(), true);
11879 assert.strictEqual(_.isUndefined(undefined), true);
11890 return index ? _.isUndefined(value) : _.isUndefined();
11895 assert.strictEqual(_.isUndefined(args), false);
11896 assert.strictEqual(_.isUndefined([1, 2, 3]), false);
11897 assert.strictEqual(_.isUndefined(true), false);
11898 assert.strictEqual(_.isUndefined(new Date), false);
11899 assert.strictEqual(_.isUndefined(new Error), false);
11900 assert.strictEqual(_.isUndefined(_), false);
11901 assert.strictEqual(_.isUndefined(slice), false);
11902 assert.strictEqual(_.isUndefined({ 'a': 1 }), false);
11903 assert.strictEqual(_.isUndefined(1), false);
11904 assert.strictEqual(_.isUndefined(/x/), false);
11905 assert.strictEqual(_.isUndefined('a'), false);
11908 assert.strictEqual(_.isUndefined(symbol), false);
11919 assert.strictEqual(_.isUndefined(realm.undefined), true);
11936 assert.strictEqual(_.isWeakMap(weakMap), true);
11949 return index ? _.isWeakMap(value) : _.isWeakMap();
11954 assert.strictEqual(_.isWeakMap(args), false);
11955 assert.strictEqual(_.isWeakMap([1, 2, 3]), false);
11956 assert.strictEqual(_.isWeakMap(true), false);
11957 assert.strictEqual(_.isWeakMap(new Date), false);
11958 assert.strictEqual(_.isWeakMap(new Error), false);
11959 assert.strictEqual(_.isWeakMap(_), false);
11960 assert.strictEqual(_.isWeakMap(slice), false);
11961 assert.strictEqual(_.isWeakMap({ 'a': 1 }), false);
11962 assert.strictEqual(_.isWeakMap(map), false);
11963 assert.strictEqual(_.isWeakMap(1), false);
11964 assert.strictEqual(_.isWeakMap(/x/), false);
11965 assert.strictEqual(_.isWeakMap('a'), false);
11966 assert.strictEqual(_.isWeakMap(symbol), false);
11976 return _.isWeakMap({ 'constructor': value });
11986 assert.strictEqual(_.isWeakMap(realm.weakMap), true);
12003 assert.strictEqual(_.isWeakSet(weakSet), true);
12016 return index ? _.isWeakSet(value) : _.isWeakSet();
12021 assert.strictEqual(_.isWeakSet(args), false);
12022 assert.strictEqual(_.isWeakSet([1, 2, 3]), false);
12023 assert.strictEqual(_.isWeakSet(true), false);
12024 assert.strictEqual(_.isWeakSet(new Date), false);
12025 assert.strictEqual(_.isWeakSet(new Error), false);
12026 assert.strictEqual(_.isWeakSet(_), false);
12027 assert.strictEqual(_.isWeakSet(slice), false);
12028 assert.strictEqual(_.isWeakSet({ 'a': 1 }), false);
12029 assert.strictEqual(_.isWeakSet(1), false);
12030 assert.strictEqual(_.isWeakSet(/x/), false);
12031 assert.strictEqual(_.isWeakSet('a'), false);
12032 assert.strictEqual(_.isWeakSet(set), false);
12033 assert.strictEqual(_.isWeakSet(symbol), false);
12040 assert.strictEqual(_.isWeakSet(realm.weakSet), true);
12067 … assert.strictEqual(_[methodName](object), false, '`_.' + methodName + '` returns `false`');
12088 _[methodName](xml);
12089 assert.ok(true, '`_.' + methodName + '` should not error');
12107 iteratee = _.iteratee(fn),
12113 QUnit.test('should return `_.identity` when `func` is nullish', function(assert) {
12118 … expected = lodashStable.map(values, lodashStable.constant([!isNpm && _.identity, object]));
12121 var identity = index ? _.iteratee(value) : _.iteratee();
12128 …QUnit.test('should return an iteratee created by `_.matches` when `func` is an object', function(a…
12131 var matches = _.iteratee({ 'a': 1, 'b': 2 });
12136 QUnit.test('should not change `_.matches` behavior if `source` is modified', function(assert) {
12147 matches = _.iteratee(source);
12165 …QUnit.test('should return an iteratee created by `_.matchesProperty` when `func` is an array', fun…
12169 matches = _.iteratee([0, 'a']);
12173 matches = _.iteratee(['0', 'a']);
12176 matches = _.iteratee([1, undefined]);
12180 QUnit.test('should support deep paths for `_.matchesProperty` shorthands', function(assert) {
12184 matches = _.iteratee(['a.b', { 'c': 1 }]);
12189 …QUnit.test('should not change `_.matchesProperty` behavior if `source` is modified', function(asse…
12200 matches = _.iteratee(['a', source]);
12218 …QUnit.test('should return an iteratee created by `_.property` when `func` is a number or string', …
12222 prop = _.iteratee(0);
12226 prop = _.iteratee('0');
12230 QUnit.test('should support deep paths for `_.property` shorthands', function(assert) {
12234 prop = _.iteratee('a.b');
12239 …QUnit.test('should work with functions created by `_.partial` and `_.partialRight`', function(asse…
12249 object = { 'a': 1 , 'iteratee': _.iteratee(_.partial(fn, 2)) };
12253 object.iteratee = _.iteratee(_.partialRight(fn, 3));
12260 var iteratee = _.iteratee;
12261 delete _.iteratee;
12263 assert.deepEqual(_.map([{ 'a': 1 }], 'a'), [1]);
12265 _.iteratee = iteratee;
12268 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
12273 iteratees = lodashStable.map(array, _.iteratee),
12286 QUnit.module('custom `_.iteratee` methods');
12290 getPropA = _.partial(_.property, 'a'),
12291 getPropB = _.partial(_.property, 'b'),
12292 getLength = _.partial(_.property, 'length'),
12293 iteratee = _.iteratee;
12307 QUnit.test('`_.countBy` should use `_.iteratee` internally', function(assert) {
12311 _.iteratee = getLength;
12312 assert.deepEqual(_.countBy(array), { '3': 2, '5': 1 });
12313 _.iteratee = iteratee;
12320 QUnit.test('`_.differenceBy` should use `_.iteratee` internally', function(assert) {
12324 _.iteratee = getPropA;
12325 assert.deepEqual(_.differenceBy(objects, [objects[1]]), [objects[0]]);
12326 _.iteratee = iteratee;
12333 QUnit.test('`_.dropRightWhile` should use `_.iteratee` internally', function(assert) {
12337 _.iteratee = getPropB;
12338 assert.deepEqual(_.dropRightWhile(objects), objects.slice(0, 2));
12339 _.iteratee = iteratee;
12346 QUnit.test('`_.dropWhile` should use `_.iteratee` internally', function(assert) {
12350 _.iteratee = getPropB;
12351 assert.deepEqual(_.dropWhile(objects.reverse()).reverse(), objects.reverse().slice(0, 2));
12352 _.iteratee = iteratee;
12359 QUnit.test('`_.every` should use `_.iteratee` internally', function(assert) {
12363 _.iteratee = getPropA;
12364 assert.strictEqual(_.every(objects.slice(1)), true);
12365 _.iteratee = iteratee;
12372 QUnit.test('`_.filter` should use `_.iteratee` internally', function(assert) {
12378 _.iteratee = getPropA;
12379 assert.deepEqual(_.filter(objects), [objects[1]]);
12380 _.iteratee = iteratee;
12387 QUnit.test('`_.find` should use `_.iteratee` internally', function(assert) {
12391 _.iteratee = getPropA;
12392 assert.strictEqual(_.find(objects), objects[1]);
12393 _.iteratee = iteratee;
12400 QUnit.test('`_.findIndex` should use `_.iteratee` internally', function(assert) {
12404 _.iteratee = getPropA;
12405 assert.strictEqual(_.findIndex(objects), 1);
12406 _.iteratee = iteratee;
12413 QUnit.test('`_.findLast` should use `_.iteratee` internally', function(assert) {
12417 _.iteratee = getPropA;
12418 assert.strictEqual(_.findLast(objects), objects[2]);
12419 _.iteratee = iteratee;
12426 QUnit.test('`_.findLastIndex` should use `_.iteratee` internally', function(assert) {
12430 _.iteratee = getPropA;
12431 assert.strictEqual(_.findLastIndex(objects), 2);
12432 _.iteratee = iteratee;
12439 QUnit.test('`_.findKey` should use `_.iteratee` internally', function(assert) {
12443 _.iteratee = getPropB;
12444 assert.strictEqual(_.findKey(objects), '2');
12445 _.iteratee = iteratee;
12452 QUnit.test('`_.findLastKey` should use `_.iteratee` internally', function(assert) {
12456 _.iteratee = getPropB;
12457 assert.strictEqual(_.findLastKey(objects), '2');
12458 _.iteratee = iteratee;
12465 QUnit.test('`_.groupBy` should use `_.iteratee` internally', function(assert) {
12469 _.iteratee = getLength;
12470 assert.deepEqual(_.groupBy(array), { '3': ['one', 'two'], '5': ['three'] });
12471 _.iteratee = iteratee;
12478 QUnit.test('`_.intersectionBy` should use `_.iteratee` internally', function(assert) {
12482 _.iteratee = getPropA;
12483 assert.deepEqual(_.intersectionBy(objects, [objects[2]]), [objects[1]]);
12484 _.iteratee = iteratee;
12491 QUnit.test('`_.keyBy` should use `_.iteratee` internally', function(assert) {
12495 _.iteratee = getLength;
12496 assert.deepEqual(_.keyBy(array), { '3': 'two', '5': 'three' });
12497 _.iteratee = iteratee;
12504 QUnit.test('`_.map` should use `_.iteratee` internally', function(assert) {
12508 _.iteratee = getPropA;
12509 assert.deepEqual(_.map(objects), [0, 1, 1]);
12510 _.iteratee = iteratee;
12517 QUnit.test('`_.mapKeys` should use `_.iteratee` internally', function(assert) {
12521 _.iteratee = getPropB;
12522 assert.deepEqual(_.mapKeys({ 'a': { 'b': 2 } }), { '2': { 'b': 2 } });
12523 _.iteratee = iteratee;
12530 QUnit.test('`_.mapValues` should use `_.iteratee` internally', function(assert) {
12534 _.iteratee = getPropB;
12535 assert.deepEqual(_.mapValues({ 'a': { 'b': 2 } }), { 'a': 2 });
12536 _.iteratee = iteratee;
12543 QUnit.test('`_.maxBy` should use `_.iteratee` internally', function(assert) {
12547 _.iteratee = getPropB;
12548 assert.deepEqual(_.maxBy(objects), objects[2]);
12549 _.iteratee = iteratee;
12556 QUnit.test('`_.meanBy` should use `_.iteratee` internally', function(assert) {
12560 _.iteratee = getPropA;
12561 assert.strictEqual(_.meanBy(objects), 2 / 3);
12562 _.iteratee = iteratee;
12569 QUnit.test('`_.minBy` should use `_.iteratee` internally', function(assert) {
12573 _.iteratee = getPropB;
12574 assert.deepEqual(_.minBy(objects), objects[0]);
12575 _.iteratee = iteratee;
12582 QUnit.test('`_.partition` should use `_.iteratee` internally', function(assert) {
12588 _.iteratee = getPropA;
12589 assert.deepEqual(_.partition(objects), [objects.slice(0, 2), objects.slice(2)]);
12590 _.iteratee = iteratee;
12597 QUnit.test('`_.pullAllBy` should use `_.iteratee` internally', function(assert) {
12601 _.iteratee = getPropA;
12602 assert.deepEqual(_.pullAllBy(objects.slice(), [{ 'a': 1, 'b': 0 }]), [objects[0]]);
12603 _.iteratee = iteratee;
12610 QUnit.test('`_.reduce` should use `_.iteratee` internally', function(assert) {
12614 _.iteratee = getSum;
12615 assert.strictEqual(_.reduce(objects, undefined, 0), 2);
12616 _.iteratee = iteratee;
12623 QUnit.test('`_.reduceRight` should use `_.iteratee` internally', function(assert) {
12627 _.iteratee = getSum;
12628 assert.strictEqual(_.reduceRight(objects, undefined, 0), 2);
12629 _.iteratee = iteratee;
12636 QUnit.test('`_.reject` should use `_.iteratee` internally', function(assert) {
12642 _.iteratee = getPropA;
12643 assert.deepEqual(_.reject(objects), [objects[0]]);
12644 _.iteratee = iteratee;
12651 QUnit.test('`_.remove` should use `_.iteratee` internally', function(assert) {
12657 _.iteratee = getPropA;
12658 _.remove(objects);
12660 _.iteratee = iteratee;
12667 QUnit.test('`_.some` should use `_.iteratee` internally', function(assert) {
12671 _.iteratee = getPropB;
12672 assert.strictEqual(_.some(objects), true);
12673 _.iteratee = iteratee;
12680 QUnit.test('`_.sortBy` should use `_.iteratee` internally', function(assert) {
12684 _.iteratee = getPropA;
12685 assert.deepEqual(_.sortBy(objects.slice().reverse()), [objects[0], objects[2], objects[1]]);
12686 _.iteratee = iteratee;
12693 QUnit.test('`_.sortedIndexBy` should use `_.iteratee` internally', function(assert) {
12699 _.iteratee = getPropA;
12700 assert.strictEqual(_.sortedIndexBy(objects, { 'a': 40 }), 1);
12701 _.iteratee = iteratee;
12708 QUnit.test('`_.sortedLastIndexBy` should use `_.iteratee` internally', function(assert) {
12714 _.iteratee = getPropA;
12715 assert.strictEqual(_.sortedLastIndexBy(objects, { 'a': 40 }), 1);
12716 _.iteratee = iteratee;
12723 QUnit.test('`_.sumBy` should use `_.iteratee` internally', function(assert) {
12727 _.iteratee = getPropB;
12728 assert.strictEqual(_.sumBy(objects), 1);
12729 _.iteratee = iteratee;
12736 QUnit.test('`_.takeRightWhile` should use `_.iteratee` internally', function(assert) {
12740 _.iteratee = getPropB;
12741 assert.deepEqual(_.takeRightWhile(objects), objects.slice(2));
12742 _.iteratee = iteratee;
12749 QUnit.test('`_.takeWhile` should use `_.iteratee` internally', function(assert) {
12753 _.iteratee = getPropB;
12754 assert.deepEqual(_.takeWhile(objects.reverse()), objects.reverse().slice(2));
12755 _.iteratee = iteratee;
12762 QUnit.test('`_.transform` should use `_.iteratee` internally', function(assert) {
12766 _.iteratee = function() {
12772 assert.deepEqual(_.transform(objects, undefined, { 'sum': 0 }), { 'sum': 2 });
12773 _.iteratee = iteratee;
12780 QUnit.test('`_.uniqBy` should use `_.iteratee` internally', function(assert) {
12784 _.iteratee = getPropB;
12785 assert.deepEqual(_.uniqBy(objects), [objects[0], objects[2]]);
12786 _.iteratee = iteratee;
12793 QUnit.test('`_.unionBy` should use `_.iteratee` internally', function(assert) {
12797 _.iteratee = getPropB;
12798 assert.deepEqual(_.unionBy(objects.slice(0, 1), [objects[2]]), [objects[0], objects[2]]);
12799 _.iteratee = iteratee;
12806 QUnit.test('`_.xorBy` should use `_.iteratee` internally', function(assert) {
12810 _.iteratee = getPropA;
12811 assert.deepEqual(_.xorBy(objects, objects.slice(1)), [objects[0]]);
12812 _.iteratee = iteratee;
12830 assert.strictEqual(_.join(array, '~'), 'a~b~c');
12837 var wrapped = _(array);
12850 assert.ok(_(array).chain().join('~') instanceof _);
12873 var actual = _.keyBy(array, function(object) {
12880 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
12888 return index ? _.keyBy(array, value) : _.keyBy(array);
12894 QUnit.test('should work with `_.property` shorthands', function(assert) {
12898 actual = _.keyBy(array, 'dir');
12906 var actual = _.keyBy([6.1, 4.2, 6.3], function(n) {
12923 assert.deepEqual(_.keyBy(array, 0), { '1': [1, 'a'], '2': [2, 'b'] });
12924 assert.deepEqual(_.keyBy(array, 1), { 'a': [2, 'a'], 'b': [2, 'b'] });
12930 var actual = _.keyBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
12943 var actual = _(array).keyBy().map(square).filter(isEven).take().value();
12945 assert.deepEqual(actual, _.take(_.filter(_.map(_.keyBy(array), square), isEven)));
12958 var func = _[methodName],
12961 …QUnit.test('`_.' + methodName + '` should return the string keyed property names of `object`', fun…
12969 …QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string k…
12983 QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
12994 …QUnit.test('`_.' + methodName + '` should return keys for custom properties on arrays', function(a…
13005 …QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string k…
13018 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
13031 …QUnit.test('`_.' + methodName + '` should return keys for custom properties on `arguments` objects…
13047 …QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string k…
13063 QUnit.test('`_.' + methodName + '` should work with string objects', function(assert) {
13071 …QUnit.test('`_.' + methodName + '` should return keys for custom properties on string objects', fu…
13082 …QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string k…
13095 QUnit.test('`_.' + methodName + '` should work with array-like objects', function(assert) {
13104 …QUnit.test('`_.' + methodName + '` should coerce primitives to objects (test in IE 9)', function(a…
13120 …QUnit.test('`_.' + methodName + '` skips the `constructor` property on prototype objects', functio…
13137 …QUnit.test('`_.' + methodName + '` should return an empty array when `object` is nullish', functio…
13162 assert.strictEqual(_.last(array), 4);
13171 assert.strictEqual(_.last([]), undefined);
13174 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
13178 actual = lodashStable.map(array, _.last);
13187 assert.strictEqual(_(array).last(), 4);
13198 assert.ok(_(array).chain().last() instanceof _);
13209 var wrapped = _(array).chain().last();
13226 wrapped = _(array).filter(isEven);
13228 assert.strictEqual(wrapped.last(), _.last(_.filter(array, isEven)));
13245 assert.strictEqual(_.lowerCase('--Foo-Bar--'), 'foo bar');
13246 assert.strictEqual(_.lowerCase('fooBar'), 'foo bar');
13247 assert.strictEqual(_.lowerCase('__FOO_BAR__'), 'foo bar');
13259 assert.strictEqual(_.lowerFirst('fred'), 'fred');
13260 assert.strictEqual(_.lowerFirst('Fred'), 'fred');
13261 assert.strictEqual(_.lowerFirst('FRED'), 'fRED');
13273 assert.strictEqual(_.lt(1, 3), true);
13274 assert.strictEqual(_.lt('abc', 'def'), true);
13280 assert.strictEqual(_.lt(3, 1), false);
13281 assert.strictEqual(_.lt(3, 3), false);
13282 assert.strictEqual(_.lt('def', 'abc'), false);
13283 assert.strictEqual(_.lt('def', 'def'), false);
13295 assert.strictEqual(_.lte(1, 3), true);
13296 assert.strictEqual(_.lte(3, 3), true);
13297 assert.strictEqual(_.lte('abc', 'def'), true);
13298 assert.strictEqual(_.lte('def', 'def'), true);
13304 assert.strictEqual(_.lt(3, 1), false);
13305 assert.strictEqual(_.lt('def', 'abc'), false);
13315 func = _[methodName],
13318 …QUnit.test('`_.' + methodName + '` should return the index of the last matched value', function(as…
13324 QUnit.test('`_.' + methodName + '` should work with a positive `fromIndex`', function(assert) {
13330 … QUnit.test('`_.' + methodName + '` should work with a `fromIndex` >= `length`', function(assert) {
13347 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex`', function(assert) {
13353 …QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex` <= `-length`', function…
13366 …QUnit.test('`_.' + methodName + '` should treat falsey `fromIndex` values correctly', function(ass…
13380 QUnit.test('`_.' + methodName + '` should coerce `fromIndex` to an integer', function(assert) {
13392 var func = _[methodName],
13396 QUnit.test('`_.' + methodName + '` should accept a falsey `array`', function(assert) {
13410 … QUnit.test('`_.' + methodName + '` should return `-1` for an unmatched value', function(assert) {
13424 QUnit.test('`_.' + methodName + '` should not match values on empty arrays', function(assert) {
13434 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
13452 QUnit.test('`_.' + methodName + '` should match `-0` as `0`', function(assert) {
13473 assert.deepEqual(_.map(array, String), expected);
13474 assert.deepEqual(_.map(object, String), expected);
13477 QUnit.test('should work with `_.property` shorthands', function(assert) {
13481 assert.deepEqual(_.map(objects, 'a'), ['x', 'y']);
13492 var actual = _.map(new Foo, identity);
13496 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
13505 return index ? _.map(collection, value) : _.map(collection);
13519 return index ? _.map(collection) : _.map();
13529 assert.deepEqual(_.map(1), []);
13536 var actual = _.map(document.getElementsByTagName('body'), function(element) {
13553 assert.deepEqual(_.map(object, identity), [value]);
13560 assert.ok(_(array).map(noop) instanceof _);
13573 expected = [1, 0, _.map(array.slice(1), square)];
13575 _(array).slice(1).map(function(value, index, array) {
13582 _(array).slice(1).map(square).map(function(value, index, array) {
13589 _(array).slice(1).map(square).map(function(value, index) {
13596 _(array).slice(1).map(square).map(function(value) {
13603 _(array).slice(1).map(square).map(function() {
13626 var actual = _.mapKeys(object, String);
13633 var actual = _.mapKeys(array, String);
13637 QUnit.test('should work with `_.property` shorthands', function(assert) {
13640 var actual = _.mapKeys({ 'a': { 'b': 'c' } }, 'b');
13644 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
13652 return index ? _.mapKeys(object, value) : _.mapKeys(object);
13670 var actual = _.mapValues(object, String);
13677 var actual = _.mapValues(array, String);
13681 QUnit.test('should work with `_.property` shorthands', function(assert) {
13684 var actual = _.mapValues({ 'a': { 'b': 2 } }, 'b');
13688 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
13696 var result = index ? _.mapValues(object, value) : _.mapValues(object);
13709 var func = _[methodName],
13712 …QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', fu…
13724 QUnit.test('`_.' + methodName + '` should accept a falsey `object`', function(assert) {
13738 …QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
13742 assert.ok(_(object)[methodName](noop) instanceof _);
13764 par = _.matches(source);
13791 return isMatches ? _.matches(source) : function(object) {
13792 return _.isMatch(object, source);
13796 …QUnit.test('`_.' + methodName + '` should perform a deep comparison between `source` and `object`'…
13819 …QUnit.test('`_.' + methodName + '` should match inherited string keyed `object` properties', funct…
13833 …QUnit.test('`_.' + methodName + '` should not match by inherited `source` properties', function(as…
13849 …QUnit.test('`_.' + methodName + '` should compare a variety of `source` property values', function…
13860 QUnit.test('`_.' + methodName + '` should match `-0` as `0`', function(assert) {
13873 QUnit.test('`_.' + methodName + '` should compare functions by reference', function(assert) {
13886 QUnit.test('`_.' + methodName + '` should work with a function for `object`', function(assert) {
13896 QUnit.test('`_.' + methodName + '` should work with a function for `source`', function(assert) {
13910 QUnit.test('`_.' + methodName + '` should work with a non-plain `object`', function(assert) {
13921 QUnit.test('`_.' + methodName + '` should partial match arrays', function(assert) {
13936 …QUnit.test('`_.' + methodName + '` should partial match arrays with duplicate values', function(as…
13957 QUnit.test('`_.' + methodName + '` should partial match maps', function(assert) {
13987 QUnit.test('`_.' + methodName + '` should partial match sets', function(assert) {
14017 QUnit.test('`_.' + methodName + '` should match `undefined` values', function(assert) {
14036 …QUnit.test('`_.' + methodName + '` should match `undefined` values on primitives', function(assert…
14065 …QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(asser…
14081 …QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source`', functio…
14095 …QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source` to a null…
14111 …QUnit.test('`_.' + methodName + '` should return `true` when comparing a `source` of empty arrays …
14130 matches = _.matchesProperty('a', 1);
14135 matches = _.matchesProperty('b', 3);
14138 matches = _.matchesProperty('a', { 'a': 1, 'c': 3 });
14141 matches = _.matchesProperty('a', { 'c': 3, 'd': 4 });
14145 matches = _.matchesProperty('a', { 'b': { 'c': 1 } });
14156 var matches = _.matchesProperty(path, 2);
14167 var matches = _.matchesProperty(path, 2);
14183 var matches = _.matchesProperty(key, values[index]),
14204 var matches = _.matchesProperty(index ? [path] : path, object[path]);
14218 var matches = _.matchesProperty(path, 1);
14230 var matches = _.matchesProperty(path, 1);
14249 var matches = _.matchesProperty(path, 1);
14267 var matches = _.matchesProperty(path, 1);
14281 var matches = _.matchesProperty(path, { 'b': 2 });
14298 assert.deepEqual(lodashStable.map(objects, _.matchesProperty(path, new Foo)), expected);
14307 matches = _.matchesProperty('a', object1);
14316 var matches = _.matchesProperty('a', -0);
14319 matches = _.matchesProperty('a', 0);
14329 matches = _.matchesProperty('a', object1);
14345 actual = lodashStable.map(objects, _.matchesProperty('a', Foo));
14356 matches = _.matchesProperty('a', { 'b': 1 });
14365 actual = lodashStable.filter(objects, _.matchesProperty('a', ['d']));
14369 actual = lodashStable.filter(objects, _.matchesProperty('a', ['b', 'd']));
14372 actual = lodashStable.filter(objects, _.matchesProperty('a', ['d', 'b']));
14380 actual = lodashStable.filter(objects, _.matchesProperty('a', [2, 2]));
14393 …var actual = lodashStable.filter(objects, _.matchesProperty('a', [{ 'a': 1 }, { 'a': 4, 'b': 5 }])…
14407 var actual = lodashStable.filter(objects, _.matchesProperty('a', map));
14412 actual = lodashStable.filter(objects, _.matchesProperty('a', map));
14417 actual = lodashStable.filter(objects, _.matchesProperty('a', map));
14437 var actual = lodashStable.filter(objects, _.matchesProperty('a', set));
14442 actual = lodashStable.filter(objects, _.matchesProperty('a', set));
14447 actual = lodashStable.filter(objects, _.matchesProperty('a', set));
14460 actual = lodashStable.map(objects, _.matchesProperty('b', undefined)),
14466 actual = lodashStable.map(objects, _.matchesProperty('a', { 'b': undefined }));
14477 var matches = _.matchesProperty(path, undefined);
14482 var matches = _.matchesProperty(path, undefined);
14494 var matches = _.matchesProperty('b', undefined);
14501 matches = _.matchesProperty('a', { 'c': undefined });
14514 matches = _.matchesProperty('a', { 'a': [], 'b': {} });
14528 matches = _.matchesProperty('a', source);
14555 assert.strictEqual(_.max([1, 2, 3]), 3);
14566 return index ? _.max(value) : _.max();
14576 assert.strictEqual(_.max(['a', 'b']), 'b');
14589 assert.strictEqual(_.mean(array), 5);
14596 actual = lodashStable.map(empties, _.mean);
14612 var actual = _.meanBy(objects, function(object) {
14624 _.meanBy(objects, function() {
14631 QUnit.test('should work with `_.property` shorthands', function(assert) {
14635 assert.strictEqual(_.meanBy(arrays, 0), 2);
14636 assert.strictEqual(_.meanBy(objects, 'a'), 2);
14686 var memoized = _.memoize(function(a, b, c) {
14698 memoized = _.memoize(fn, fn);
14708 memoized = _.memoize(fn, fn);
14721 assert.raises(function() { _.memoize(noop, true); }, TypeError);
14732 return _.isFunction(index ? _.memoize(noop, resolver) : _.memoize(noop));
14752 var memoized = _.memoize(identity);
14771 var memoized = _.memoize(function() {
14788 QUnit.test('should allow `_.memoize.Cache` to be customized', function(assert) {
14791 var oldCache = _.memoize.Cache;
14792 _.memoize.Cache = CustomCache;
14794 var memoized = _.memoize(function(object) {
14808 _.memoize.Cache = oldCache;
14811 QUnit.test('should works with an immutable `_.memoize.Cache` ', function(assert) {
14814 var oldCache = _.memoize.Cache;
14815 _.memoize.Cache = ImmutableCache;
14817 var memoized = _.memoize(function(object) {
14831 _.memoize.Cache = oldCache;
14840 var func = _._memoizeCapped;
14897 assert.deepEqual(_.merge(names, ages, heights), expected);
14916 var actual = _.merge(object, source);
14926 actual = _.merge({ 'a': 1 }, { 'a': 2 }, { 'a': 3 }, expected);
14937 actual = _.merge(Foo, source);
14948 actual = _.merge({ 'prop': fn }, object);
14958 actual = _.merge({ 'prop': fn }, { 'prop': fn }, object);
14969 actual = _.merge({}, source1, source2);
14974 actual = _.merge(source1, source2);
14984 actual = _.merge(object, { 'a': 1 });
14996 var actual = _.merge([], array),
15011 actual = _.merge(object1, object2);
15014 assert.notOk(_.isArguments(actual.value));
15018 actual = _.merge(object2, object1);
15019 assert.notOk(_.isArguments(actual.value));
15024 actual = _.merge({}, object1);
15025 assert.notOk(_.isArguments(actual.value));
15048 return Ctor ? _.merge({ 'value': new Ctor(buffer) }, { 'value': [1] }) : false;
15065 return Ctor ? _.merge({ 'value': array }, { 'value': new Ctor(buffer) }) : false;
15075 var actual = _.merge({ 'a': 1 }, { 'a': null });
15088 var object = _.merge({}, { 'a': value, 'b': { 'c': value } });
15100 actual = _.merge({}, { 'value': buffer }).value;
15124 object = _.merge({}, { 'value': value }),
15144 actual = _.merge({}, source1, source2);
15152 actual = _.merge({}, source1, source2);
15167 actual = _.merge(new Foo, object);
15172 actual = _.merge([new Foo], [object]);
15180 var actual = _.merge({ 'a': 1 }, { 'a': undefined, 'b': undefined });
15190 var actual = _.merge([4, 5, 6], array),
15198 actual = _.merge([4, 5, 6], array);
15215 _.merge(object, object);
15223 actual = _.merge(object, { 'a': ['x'] });
15227 actual = _.merge({ 'a': {} }, { 'a': [] });
15235 actual = _.merge(object, { 'a': ['x', 'y', 'z'] });
15250 return _.merge(pair[0], pair[1]).el === pair[1].el;
15266 var actual = _.mergeWith({ 'a': { 'b': [1, 1] } }, { 'a': { 'b': [0] } }, noop);
15269 actual = _.mergeWith([], [undefined], identity);
15279 _.mergeWith({}, source1, source2, noop);
15286 var actual = _.mergeWith({ 'a': { 'b': [0, 1] } }, { 'a': { 'b': [2] } }, function(a, b) {
15298 _.mergeWith({}, { 'z': 1, 'a': { 'b': 2 } }, function() {
15299 actual.push(_.last(arguments));
15303 _.each(actual, function(a) {
15314 var actual = _.mergeWith({ 'a': 0 }, { 'a': { 'b': ['c'] } }, function(a, b) {
15328 var actual = _.mergeWith(object, source, function(a, b) {
15347 var method = _.method(path);
15359 var method = _.method(path);
15367 var array = lodashStable.times(3, _.constant);
15370 var method = _.method(path);
15387 var method = _.method(index ? [path] : path);
15402 var method = _.method(path);
15413 var method = _.method(path);
15425 var method = _.method(path);
15442 var method = _.method(path);
15458 var method = _.method(path);
15473 var method = _.method(path, 1, 2, 3);
15484 var method = _.method(path);
15501 var methodOf = _.methodOf(object);
15513 var methodOf = _.methodOf(object);
15521 var array = lodashStable.times(3, _.constant);
15524 var methodOf = _.methodOf(array);
15541 var methodOf = _.methodOf(object);
15556 var methodOf = _.methodOf(new Foo);
15567 var methodOf = _.methodOf(object);
15580 var methodOf = index ? _.methodOf() : _.methodOf(value);
15596 var methodOf = index ? _.methodOf() : _.methodOf(value);
15608 methodOf = _.methodOf(object);
15624 var methodOf = _.methodOf(object, 1, 2, 3);
15635 methodOf = _.methodOf(object);
15651 assert.strictEqual(_.min([1, 2, 3]), 1);
15662 return index ? _.min(value) : _.min();
15672 assert.strictEqual(_.min(['a', 'b']), 'a');
15681 var func = _[methodName],
15684 QUnit.test('`_.' + methodName + '` should work with Date objects', function(assert) {
15693 QUnit.test('`_.' + methodName + '` should work with extremely large arrays', function(assert) {
15700 …QUnit.test('`_.' + methodName + '` should work when chaining on an array with only one value', fun…
15704 var actual = _([40])[methodName]();
15715 func = _[methodName],
15718 QUnit.test('`_.' + methodName + '` should work with an `iteratee`', function(assert) {
15728 QUnit.test('should work with `_.property` shorthands', function(assert) {
15742 …QUnit.test('`_.' + methodName + '` should work when `iteratee` returns +/-Infinity', function(asse…
15772 if (_.has(value, '__wrapped__')) {
15794 _.mixin(source);
15796 assert.strictEqual(_.a(array), 'a');
15797 assert.strictEqual(_(array).a().value(), 'a');
15798 assert.notOk('b' in _);
15799 assert.notOk('b' in _.prototype);
15801 reset(_);
15812 _.mixin(source);
15813 _.a = stubB;
15815 assert.strictEqual(_.a(array), 'b');
15816 assert.strictEqual(_(array).a().value(), 'a');
15818 reset(_);
15828 var object = lodashStable.create(_);
15832 assert.notOk('a' in _);
15833 assert.notOk('a' in _.prototype);
15835 reset(_);
15842 _.mixin(object, source);
15849 _.mixin(Wrapper, source);
15864 assert.strictEqual(_.mixin(object, source), object);
15865 assert.strictEqual(_.mixin(Wrapper, source), Wrapper);
15866 assert.strictEqual(_.mixin(), _);
15878 assert.strictEqual(_.mixin(object, new Foo), object);
15885 … return (func === _ ? 'lodash' : 'given') + ' function should ' + (chain ? '' : 'not ') + 'chain';
15888 lodashStable.each([_, Wrapper], function(func) {
15891 if (func === _) {
15892 _.mixin(source, options);
15894 _.mixin(func, source, options);
15918 _.mixin({ 'a': noop }, {});
15919 assert.notOk('a' in _);
15920 reset(_);
15929 _.mixin({}, source, 1);
15938 _.mixin(source, 1);
15944 reset(_);
15950 lodashStable.each([_, Wrapper], function(func) {
15952 if (func === _) {
15953 var wrapped = _(source),
15956 assert.strictEqual(actual.value(), _);
15959 wrapped = _(func);
15975 _.mixin({ 'a': _.countBy, 'b': _.filter });
15978 actual = _(array).a().map(square).b(isEven).take().value();
15980 assert.deepEqual(actual, _.take(_.b(_.map(_.a(array), square), isEven)));
15982 reset(_);
15998 assert.strictEqual(_.multiply(6, 4), 24);
15999 assert.strictEqual(_.multiply(-6, 4), -24);
16000 assert.strictEqual(_.multiply(-6, -4), 24);
16006 assert.strictEqual(_.multiply('6', '4'), 24);
16007 assert.deepEqual(_.multiply('x', 'y'), NaN);
16026 var actual = _.orderBy(objects, 'a', 'desc');
16033 var actual = _.orderBy(objects, ['a', 'b'], ['desc', 'asc']);
16041 actual = _.orderBy(objects, ['a', 'b']);
16048 return _.orderBy(objects, ['a', 'b'], index ? ['desc', order] : ['desc']);
16057 var actual = _.orderBy(objects, ['a'], [Object('desc')]);
16074 var over = _.overArgs(fn, doubled, square);
16078 QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
16081 var over = _.overArgs(fn, undefined, null);
16085 QUnit.test('should work with `_.property` shorthands', function(assert) {
16088 var over = _.overArgs(fn, 'b', 'a');
16092 QUnit.test('should work with `_.matches` shorthands', function(assert) {
16095 var over = _.overArgs(fn, { 'b': 1 }, { 'a': 1 });
16099 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
16102 var over = _.overArgs(fn, [['b', 1], ['a', 1]]);
16106 …QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', functio…
16109 var over = _.overArgs(fn, ['a', 1]);
16112 over = _.overArgs(fn, [['a', 1]]);
16119 var over = _.overArgs(fn, [doubled, square], String);
16126 var over = _.overArgs(fn, doubled, square);
16133 var over = _.overArgs(fn);
16140 var over = _.overArgs(fn, doubled, identity);
16149 over = _.overArgs(noop, transform, transform, transform);
16158 var over = _.overArgs(function(x) {
16177 var negate = _.negate(isEven);
16186 var negate = _.negate(isEven);
16197 negate = _.negate(function() { argCount = arguments.length; }),
16224 assert.strictEqual(_.noConflict(), oldDash);
16225 assert.notStrictEqual(root._, oldDash);
16226 root._ = oldDash;
16233 QUnit.test('should restore `_` only if `lodash` is the current `_` value', function(assert) {
16237 var object = root._ = {};
16238 assert.strictEqual(_.noConflict(), oldDash);
16239 assert.strictEqual(root._, object);
16240 root._ = oldDash;
16254 context = vm.createContext({ '_': expected, 'console': console }), property
16257 vm.runInContext(source + '\nthis.lodash = this._.noConflict()', context);
16259 assert.strictEqual(context._, expected);
16279 actual = _.now();
16284 assert.ok(_.now() > actual);
16295 var actual = _.now();
16313 return _.nth(array, index);
16323 return _.nth(array, -n);
16336 return n ? _.nth(array, n) : _.nth(array);
16345 return _.nth(array, n);
16358 return _.nth(array, 1);
16374 return _.nth(array, n);
16392 var func = _.nthArg(index);
16403 var func = _.nthArg(-n);
16417 var func = n ? _.nthArg(n) : _.nthArg();
16427 var func = _.nthArg(n);
16437 var func = _.nthArg(1);
16448 var func = _.nthArg(n);
16468 assert.deepEqual(_.omit(object, 'a', 'c'), { 'b': 2, 'd': 4 });
16469 assert.deepEqual(_.omit(object, ['a', 'd'], 'c'), { 'b': 2 });
16475 assert.deepEqual(_.omit(nested, 'b.c'), { 'a': 1, 'b': { 'd': 3} });
16482 actual = _.omit(object, [['a.b']]);
16493 assert.deepEqual(_.omit(object, path), { 'a': { 'b': 2 } });
16500 assert.deepEqual(_.omit({ '0': 'a' }, 0), {});
16508 var actual = _.omit(value, 'valueOf');
16520 assert.deepEqual(_.omit('', 'b'), { 'a': 1 });
16529 assert.deepEqual(_.omit(object, args), { 'b': 2, 'd': 4 });
16537 _.omit(object, path);
16553 var actual = _.omitBy(object, function(n) {
16567 func = _[methodName],
16582 …QUnit.test('`_.' + methodName + '` should create an object with omitted string keyed properties', …
16589 …QUnit.test('`_.' + methodName + '` should include inherited string keyed properties', function(ass…
16598 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
16612 QUnit.test('`_.' + methodName + '` should include symbols', function(assert) {
16644 …QUnit.test('`_.' + methodName + '` should create an object with omitted symbols', function(assert)…
16684 QUnit.test('`_.' + methodName + '` should work with an array `object`', function(assert) {
16701 once = _.once(function() { return ++count; });
16713 var once = _.once(function() {
16725 var once = _.once(function() {
16744 var over = _.over(Math.max, Math.min);
16748 QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
16751 var over = _.over(undefined, null);
16755 QUnit.test('should work with `_.property` shorthands', function(assert) {
16758 var over = _.over('b', 'a');
16762 QUnit.test('should work with `_.matches` shorthands', function(assert) {
16765 var over = _.over({ 'b': 1 }, { 'a': 1 });
16769 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
16772 var over = _.over([['b', 2], ['a', 2]]);
16778 …QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', functio…
16781 var over = _.over(['a', 1]);
16786 over = _.over([['a', 1]]);
16795 var over = _.over(function() {
16805 var over = _.over(function() { return this.b; }, function() { return this.a; }),
16820 var over = _.overEvery(stubTrue, stubOne, stubA);
16830 over = _.overEvery(countTrue, countFalse, countTrue);
16836 QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
16839 var over = _.overEvery(undefined, null);
16845 QUnit.test('should work with `_.property` shorthands', function(assert) {
16848 var over = _.overEvery('b', 'a');
16854 QUnit.test('should work with `_.matches` shorthands', function(assert) {
16857 var over = _.overEvery({ 'b': 2 }, { 'a': 1 });
16863 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
16866 var over = _.overEvery([['b', 2], ['a', 1]]);
16872 …QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', functio…
16875 var over = _.overEvery(['a', 1]);
16881 over = _.overEvery([['a', 1]]);
16890 var over = _.overEvery(stubTrue, [stubFalse]);
16899 var over = _.overEvery(function() {
16910 var over = _.overEvery(function() { return this.b; }, function() { return this.a; }),
16928 var over = _.overSome(stubFalse, stubOne, stubString);
16931 over = _.overSome(stubNull, stubA, stubZero);
16941 over = _.overSome(countFalse, countTrue, countFalse);
16950 var over = _.overSome(stubFalse, stubFalse, stubFalse);
16953 over = _.overSome(stubNull, stubZero, stubString);
16957 QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
16960 var over = _.overSome(undefined, null);
16966 QUnit.test('should work with `_.property` shorthands', function(assert) {
16969 var over = _.overSome('b', 'a');
16975 QUnit.test('should work with `_.matches` shorthands', function(assert) {
16978 var over = _.overSome({ 'b': 2 }, { 'a': 1 });
16984 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
16987 var over = _.overSome([['b', 2], ['a', 1]]);
16993 …QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', functio…
16996 var over = _.overSome(['a', 1]);
17002 over = _.overSome([['a', 1]]);
17011 var over = _.overSome(stubFalse, [stubTrue]);
17020 var over = _.overSome(function() {
17031 var over = _.overSome(function() { return this.b; }, function() { return this.a; }),
17055 return index ? _.pad(string, 6, value) : _.pad(string, 6);
17064 assert.strictEqual(_.pad(string, 8), ' abc ');
17065 assert.strictEqual(_.pad(string, 8, '_-'), '_-abc_-_');
17075 return _.pad(value, 6) === ' abc ';
17096 return index ? _.padEnd(string, 6, value) : _.padEnd(string, 6);
17105 assert.strictEqual(_.padEnd(string, 6, '_-'), 'abc_-_');
17115 return _.padEnd(value, 6) === 'abc ';
17136 return index ? _.padStart(string, 6, value) : _.padStart(string, 6);
17145 assert.strictEqual(_.padStart(string, 6, '_-'), '_-_abc');
17155 return _.padStart(value, 6) === ' abc';
17167 var func = _[methodName],
17172 QUnit.test('`_.' + methodName + '` should not pad if string is >= `length`', function(assert) {
17179 QUnit.test('`_.' + methodName + '` should treat negative `length` as `0`', function(assert) {
17187 QUnit.test('`_.' + methodName + '` should coerce `length` to a number', function(assert) {
17196 …QUnit.test('`_.' + methodName + '` should treat nullish values as empty strings', function(assert)…
17199 lodashStable.each([undefined, '_-'], function(chars) {
17207 …QUnit.test('`_.' + methodName + '` should return `string` when `chars` coerces to an empty string'…
17214 return _.pad(string, 6, value);
17232 return _.parseInt('10', radix);
17241 assert.strictEqual(_.parseInt('10'), 10);
17242 assert.strictEqual(_.parseInt('10', 0), 10);
17243 assert.strictEqual(_.parseInt('10', 10), 10);
17244 assert.strictEqual(_.parseInt('10', undefined), 10);
17251 assert.strictEqual(_.parseInt(string), 32);
17252 assert.strictEqual(_.parseInt(string, 0), 32);
17253 assert.strictEqual(_.parseInt(string, 16), 32);
17254 assert.strictEqual(_.parseInt(string, undefined), 32);
17261 assert.strictEqual(_.parseInt('08'), 8);
17262 assert.strictEqual(_.parseInt('08', 10), 8);
17272 func = (index ? (lodashBizarro || {}) : _).parseInt;
17302 assert.strictEqual(_.parseInt('08', object), 8);
17303 assert.strictEqual(_.parseInt('0x20', object), 32);
17306 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
17310 actual = lodashStable.map(strings, _.parseInt);
17314 actual = lodashStable.map('123', _.parseInt);
17324 var func = _[methodName],
17328 QUnit.test('`_.' + methodName + '` partially applies arguments', function(assert) {
17335 …QUnit.test('`_.' + methodName + '` creates a function that can be invoked with additional argument…
17345 …QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the cre…
17354 …QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the cre…
17361 QUnit.test('`_.' + methodName + '` should support placeholders', function(assert) {
17379 QUnit.test('`_.' + methodName + '` should use `_.placeholder` when set', function(assert) {
17383 var _ph = _.placeholder = {},
17389 delete _.placeholder;
17396 … QUnit.test('`_.' + methodName + '` creates a function with a `length` of `0`', function(assert) {
17405 …QUnit.test('`_.' + methodName + '` should ensure `new par` is an instance of `func`', function(ass…
17419 …QUnit.test('`_.' + methodName + '` should clone metadata for created functions', function(assert) {
17435 QUnit.test('`_.' + methodName + '` should work with curried functions', function(assert) {
17439 curried = _.curry(func(fn, 1), 2);
17449 curried = _.curry(fn),
17461 QUnit.test('should work as a deep `_.defaults`', function(assert) {
17468 var defaultsDeep = _.partialRight(_.mergeWith, function deep(value, other) {
17469 return lodashStable.isObject(value) ? _.mergeWith(value, other, deep) : value;
17485 var ph1 = _.bind.placeholder,
17486 ph2 = _.bindKey.placeholder,
17487 ph3 = _.partial.placeholder,
17488 ph4 = _.partialRight.placeholder;
17493 var a = _.partial(fn),
17494 b = _.partialRight(a, 3),
17495 c = _.partial(b, 1);
17512 var a = _.bindKey(object, 'fn'),
17513 b = _.partialRight(a, 4),
17514 c = _.partial(b, 2);
17518 a = _.bind(fn, object);
17519 b = _.partialRight(a, 4);
17520 c = _.partial(b, 2);
17524 a = _.partial(fn, 2);
17525 b = _.bind(a, object);
17526 c = _.partialRight(b, 4);
17538 var combo = _.partial(_.partialRight(Foo, 3), 1),
17551 var a = _.bindKey(object, 'fn', ph2, 2),
17552 b = _.partialRight(a, ph4, 6),
17553 c = _.partial(b, 1, ph3, 4);
17557 a = _.bind(fn, object, ph1, 2);
17558 b = _.partialRight(a, ph4, 6);
17559 c = _.partial(b, 1, ph3, 4);
17563 a = _.partial(fn, ph3, 2);
17564 b = _.bind(a, object, 1, ph1, 4);
17565 c = _.partialRight(b, ph4, 6);
17576 var a = _.bindKey(object, 'fn', ph2, 2),
17577 b = _.partialRight(a, ph4, 4),
17578 c = _.partial(b, ph3, 3);
17582 a = _.bind(fn, object, ph1, 2);
17583 b = _.partialRight(a, ph4, 4);
17584 c = _.partial(b, ph3, 3);
17588 a = _.partial(fn, ph3, 2);
17589 b = _.bind(a, object, ph1, 3);
17590 c = _.partialRight(b, ph4, 4);
17602 var a = _.bind(fn, { 'a': 1 }),
17603 b = _.bind(a, { 'a': 2 }),
17604 c = _.bind(b, { 'a': 3 });
17620 bound1 = index ? _.bind(fn, object, 1) : _.bind(fn, object),
17623 var actual = _.last(lodashStable.times(HOT_COUNT, function() {
17624 var bound2 = index ? _.bind(bound1, null, 2) : _.bind(bound1);
17630 actual = _.last(lodashStable.times(HOT_COUNT, function() {
17631 var bound1 = index ? _.bind(fn, object, 1) : _.bind(fn, object),
17632 bound2 = index ? _.bind(bound1, null, 2) : _.bind(bound1);
17642 curried = _[methodName](fn),
17645 var actual = _.last(lodashStable.times(HOT_COUNT, function() {
17651 actual = _.last(lodashStable.times(HOT_COUNT, function() {
17652 var curried = _[methodName](fn);
17660 var func = _[methodName],
17665 var actual = _.last(lodashStable.times(HOT_COUNT, function() {
17672 actual = _.last(lodashStable.times(HOT_COUNT, function() {
17694 assert.deepEqual(_.partition([], identity), [[], []]);
17695 assert.deepEqual(_.partition(array, stubTrue), [array, []]);
17696 assert.deepEqual(_.partition(array, stubFalse), [[], array]);
17699 QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
17706 return index ? _.partition(array, value) : _.partition(array);
17712 QUnit.test('should work with `_.property` shorthands', function(assert) {
17716 actual = _.partition(objects, 'a');
17730 assert.deepEqual(_.partition(array, 0), [[array[0], array[2]], [array[1]]]);
17731 assert.deepEqual(_.partition(array, 1), [[array[1]], [array[0], array[2]]]);
17737 var actual = _.partition({ 'a': 1.1, 'b': 0.2, 'c': 1.3 }, Math.floor);
17754 assert.deepEqual(_.pick(object, 'a', 'c'), { 'a': 1, 'c': 3 });
17755 assert.deepEqual(_.pick(object, ['a', 'd'], 'c'), { 'a': 1, 'c': 3, 'd': 4 });
17761 assert.deepEqual(_.pick(nested, 'b.c'), { 'b': { 'c': 2 } });
17768 actual = _.pick(object, [['a.b']]);
17779 assert.deepEqual(_.pick(object, path), { 'a.b': 1 });
17786 assert.deepEqual(_.pick({ '0': 'a', '1': 'b' }, 0), { '0': 'a' });
17793 assert.deepEqual(_.pick(value, 'valueOf'), {});
17800 assert.deepEqual(_.pick('', 'slice'), { 'slice': ''.slice });
17806 assert.deepEqual(_.pick(object, args), { 'a': 1, 'c': 3 });
17820 var actual = _.pickBy(object, function(n) {
17831 actual = _.pickBy(object, stubTrue);
17843 func = _[methodName],
17859 …QUnit.test('`_.' + methodName + '` should create an object of picked string keyed properties', fun…
17866 …QUnit.test('`_.' + methodName + '` should pick inherited string keyed properties', function(assert…
17876 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
17890 QUnit.test('`_.' + methodName + '` should pick symbols', function(assert) {
17926 QUnit.test('`_.' + methodName + '` should work with an array `object`', function(assert) {
17945 var prop = _.property(path);
17957 var prop = _.property(path);
17969 var prop = _.property(path);
17980 var prop = _.property(path);
17992 var prop = _.property(key);
18011 var prop = _.property(index ? [path] : path);
18025 var prop = _.property(path);
18037 var prop = _.property(path);
18054 var prop = _.property(path);
18070 var prop = _.property(path);
18085 propOf = _.propertyOf(object);
18097 propOf = _.propertyOf(object);
18112 var propOf = _.propertyOf(new Foo);
18123 propOf = _.propertyOf(array);
18137 var propOf = _.propertyOf(object);
18156 var propOf = _.propertyOf(object);
18168 propOf = _.propertyOf(object);
18183 var propOf = index ? _.propertyOf(value) : _.propertyOf();
18199 var propOf = index ? _.propertyOf(value) : _.propertyOf();
18210 var propOf = _.propertyOf({});
18227 actual = _.pullAll(array, array);
18243 var actual = _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function(object) {
18256 _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function() {
18274 actual = _.pullAllWith(objects, [{ 'x': 2, 'y': 2 }], lodashStable.isEqual);
18285 var func = _[methodName],
18294 QUnit.test('`_.' + methodName + '` should modify and return the array', function(assert) {
18304 QUnit.test('`_.' + methodName + '` should preserve holes in arrays', function(assert) {
18316 QUnit.test('`_.' + methodName + '` should treat holes as `undefined`', function(assert) {
18326 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
18345 actual = _.pullAt(array, [0, 1]);
18355 actual = _.pullAt(array, [1, 3, 11, 7, 5, 9]);
18365 actual = _.pullAt(array, [0, 2, 0, 1, 0, 2]);
18375 actual = _.pullAt(array, [2, 4, 0]);
18385 assert.deepEqual(_.pullAt(array, 2, 0), ['c', 'a']);
18389 assert.deepEqual(_.pullAt(array, [3, 0], 2), ['d', 'a', 'c']);
18397 actual = _.pullAt(array);
18402 actual = _.pullAt(array, [], []);
18420 actual = _.pullAt(array, values);
18438 return _.pullAt(array, key);
18450 var actual = _.pullAt(array, 'a.b');
18456 actual = _.pullAt(array, 'a.b.c');
18470 return _.pullAt(array, 0, 1, 'pop', 'push');
18489 return _.random();
18502 var result = _.random(min, max);
18514 var result = _.random(max);
18527 return _.random(min, max);
18540 var result = _.random(min, max);
18545 return _.random(MAX_INTEGER);
18553 _.random(NaN, NaN),
18554 _.random('1', '1'),
18555 _.random(Infinity, Infinity)
18566 actual = _.random(min, max);
18575 var actual = _.random(true);
18578 actual = _.random(2, true);
18581 actual = _.random(2, 4, true);
18585 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
18590 randoms = lodashStable.map(array, _.random);
18605 var func = _[methodName],
18612 …QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `end` is given', func…
18619 …QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `start` and `end` are…
18626 …QUnit.test('`_.' + methodName + '` should work with a `start`, `end`, and `step`', function(assert…
18634 QUnit.test('`_.' + methodName + '` should support a `step` of `0`', function(assert) {
18640 …QUnit.test('`_.' + methodName + '` should work with a `step` larger than `end`', function(assert) {
18646 QUnit.test('`_.' + methodName + '` should work with a negative `step`', function(assert) {
18653 QUnit.test('`_.' + methodName + '` should support `start` of `-0`', function(assert) {
18660 QUnit.test('`_.' + methodName + '` should treat falsey `start` as `0`', function(assert) {
18673 … QUnit.test('`_.' + methodName + '` should coerce arguments to finite numbers', function(assert) {
18687 …QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(…
18713 var rearged = _.rearg(fn, [2, 0, 1]);
18720 var rearged = _.rearg(fn, [1, 1, 1]);
18727 var rearged = _.rearg(fn, [1, 4]);
18741 var rearged = _.rearg(fn, [value]);
18751 var rearged = _.rearg(fn);
18754 rearged = _.rearg(fn, [], []);
18761 var rearged = _.rearg(fn, 2, 0, 1);
18768 var rearged = _.rearg(fn, [2], [0, 1]);
18775 var rearged = _.rearg(fn, [1, 0]);
18782 var rearged1 = _.rearg(fn, 2, 1, 0),
18783 rearged2 = _.rearg(rearged1, 1, 0, 2);
18799 assert.strictEqual(_.reduce(array), 1);
18807 _.reduce(array, function() {
18814 _.reduce(array, function() {
18826 firstKey = _.head(_.keys(object));
18832 _.reduce(object, function() {
18843 _.reduce(object, function() {
18861 assert.strictEqual(_.reduceRight(array), 3);
18869 _.reduceRight(array, function() {
18876 _.reduceRight(array, function() {
18894 _.reduceRight(object, function() {
18905 _.reduceRight(object, function() {
18918 var func = _[methodName],
18922 …QUnit.test('`_.' + methodName + '` should reduce a collection to a single value', function(assert)…
18932 …QUnit.test('`_.' + methodName + '` should support empty collections without an initial `accumulato…
18947 …QUnit.test('`_.' + methodName + '` should support empty collections with an initial `accumulator` …
18961 …QUnit.test('`_.' + methodName + '` should handle an initial `accumulator` value of `undefined`', f…
18968 …QUnit.test('`_.' + methodName + '` should return `undefined` for empty collections when no `accumu…
18984 …QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', fun…
18988 assert.strictEqual(_(array)[methodName](add), 6);
18995 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
18999 assert.ok(_(array).chain()[methodName](add) instanceof _);
19017 assert.deepEqual(_.reject(array, isEven), [1, 3]);
19027 func = _[methodName],
19031 …QUnit.test('`_.' + methodName + '` should not modify the resulting value from within `predicate`',…
19042 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
19048 QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
19054 QUnit.test('`_.' + methodName + '` should not modify wrapped values', function(assert) {
19058 var wrapped = _(array);
19077 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
19088 var actual = _(array).slice(1).map(square)[methodName](predicate).value();
19089 … assert.deepEqual(actual, _[methodName](lodashStable.map(array.slice(1), square), predicate));
19091 actual = _(object).mapValues(square)[methodName](predicate).value();
19092 assert.deepEqual(actual, _[methodName](lodashStable.mapValues(object, square), predicate));
19099 …QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments in a lazy sequence…
19107 _(array).slice(1)[methodName](function(value, index, array) {
19114 _(array).slice(1).map(square)[methodName](function(value, index, array) {
19121 _(array).slice(1).map(square)[methodName](function(value, index) {
19128 _(array).slice(1).map(square)[methodName](function(value) {
19135 _(array).slice(1).map(square)[methodName](function() {
19156 actual = _.remove(array, isEven);
19169 _.remove(array, function(n, index) {
19179 QUnit.test('should work with `_.matches` shorthands', function(assert) {
19183 _.remove(objects, { 'a': 1 });
19187 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
19191 _.remove(objects, ['a', 1]);
19195 QUnit.test('should work with `_.property` shorthands', function(assert) {
19199 _.remove(objects, 'a');
19210 _.remove(array, function(n) {
19224 _.remove(array, function(n) {
19236 _.remove(array, function(n, index) {
19254 assert.strictEqual(_.repeat('*', 3), '***');
19255 assert.strictEqual(_.repeat(string, 2), 'abcabc');
19266 return index ? _.repeat(string, n) : _.repeat(string);
19275 assert.strictEqual(_.repeat(string, 0), '');
19276 assert.strictEqual(_.repeat(string, -2), '');
19282 assert.strictEqual(_.repeat(string, '2'), 'abcabc');
19283 assert.strictEqual(_.repeat(string, 2.6), 'abcabc');
19284 assert.strictEqual(_.repeat('*', { 'valueOf': stubThree }), '***');
19290 assert.strictEqual(_.repeat(Object(string), 2), 'abcabc');
19291 assert.strictEqual(_.repeat({ 'toString': lodashStable.constant('*') }, 3), '***');
19294 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
19297 var actual = lodashStable.map(['a', 'b', 'c'], _.repeat);
19311 assert.strictEqual(_.replace(string, 'de', '123'), 'abc123');
19312 assert.strictEqual(_.replace(string, /[bd]/g, '-'), 'a-c-e');
19326 assert.strictEqual(_.result(object, 'b'), 'b');
19332 var actual = _.result(object, 'c', object.b);
19342 assert.strictEqual(_.result(value, path), 'b');
19352 assert.strictEqual(_.result(value, path), 1);
19362 var func = _[methodName];
19364 QUnit.test('`_.' + methodName + '` should get string keyed property values', function(assert) {
19374 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
19387 QUnit.test('`_.' + methodName + '` should get symbol keyed property values', function(assert) {
19401 QUnit.test('`_.' + methodName + '` should get deep property values', function(assert) {
19411 QUnit.test('`_.' + methodName + '` should get a key over a path', function(assert) {
19421 QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
19428 QUnit.test('`_.' + methodName + '` should not ignore empty brackets', function(assert) {
19435 QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
19444 QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
19459 …QUnit.test('`_.' + methodName + '` should return `undefined` when `object` is nullish', function(a…
19468 …QUnit.test('`_.' + methodName + '` should return `undefined` for deep paths when `object` is nulli…
19484 …QUnit.test('`_.' + methodName + '` should return `undefined` if parts of `path` are missing', func…
19494 QUnit.test('`_.' + methodName + '` should be able to return `null` values', function(assert) {
19504 …QUnit.test('`_.' + methodName + '` should follow `path` over non-plain objects', function(assert) {
19516 …QUnit.test('`_.' + methodName + '` should return the default value for `undefined` values', functi…
19532 …QUnit.test('`_.' + methodName + '` should return the default value when `path` is empty', function…
19551 var rest = _.rest(fn);
19558 var rest = _.rest(fn, 1);
19569 var rest = _.rest(fn, value);
19579 var rest = _.rest(fn, 1.6);
19586 var rest = _.rest(fn);
19593 var rest = _.rest(function(a, b, c, d) {
19613 actual = _.reverse(array);
19626 wrapped = _(array).reverse(),
19629 assert.ok(wrapped instanceof _);
19646 actual = _(array).slice(1).reverse().value();
19671 var wrapped = _(array).slice(1).map(String).reverse(),
19675 assert.ok(wrapped instanceof _);
19694 actual = _(array)[methodName](identity).thru(_.compact).reverse().value();
19699 … actual = _(array).thru(_.compact)[methodName](identity).pull(1).push(3).reverse().value();
19717 wrapped = _(array).chain().reverse().head();
19719 assert.ok(wrapped instanceof _);
19720 assert.strictEqual(wrapped.value(), _.head(expected));
19735 var func = _[methodName],
19739 …QUnit.test('`_.' + methodName + '` should return a rounded number without a precision', function(a…
19746 QUnit.test('`_.' + methodName + '` should work with a precision of `0`', function(assert) {
19753 QUnit.test('`_.' + methodName + '` should work with a positive precision', function(assert) {
19763 QUnit.test('`_.' + methodName + '` should work with a negative precision', function(assert) {
19770 QUnit.test('`_.' + methodName + '` should coerce `precision` to an integer', function(assert) {
19785 …QUnit.test('`_.' + methodName + '` should work with exponential notation and `precision`', functio…
19798 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
19811 …QUnit.test('`_.' + methodName + '` should not return `NaN` for large `precision` values', function…
19815 _.round(10.0000001, 1000),
19816 _.round(MAX_SAFE_INTEGER, 293)
19825 …QUnit.test('`_.' + methodName + '` should return `Infinity` given `Infinity` regardless of `precis…
19847 …QUnit.test('`_.' + methodName + '` should return `-Infinity` given `-Infinity` regardless of `prec…
19869 …QUnit.test('`_.' + methodName + '` should return `NaN` given `NaN` regardless of `precision`', fun…
19901 var lodash = _.runInContext({
19914 QUnit.test('should use a zeroed `_.uniqueId` counter', function(assert) {
19918 lodashStable.times(2, _.uniqueId);
19920 var oldId = Number(_.uniqueId()),
19921 lodash = _.runInContext();
19923 assert.ok(_.uniqueId() > oldId);
19945 var actual = _.sample(array);
19956 result.push(_.sample(value));
19967 actual = _.sample(object);
19983 var actual = _.sampleSize(array, 2);
19992 var actual = _.sampleSize(array, array.length).sort();
20005 return index ? _.sampleSize(['a'], size) : _.sampleSize(['a']);
20015 assert.deepEqual(_.sampleSize(array, n), []);
20023 var actual = _.sampleSize(array, n).sort();
20031 var actual = _.sampleSize(array, 1.6);
20042 result.push(_.sampleSize(value, 1));
20053 actual = _.sampleSize(object, 2);
20059 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
20062 var actual = lodashStable.map([['a']], _.sampleSize);
20075 var actual = _.setWith({ '0': {} }, '[0][1][2]', 3, function(value) {
20085 var actual = _.setWith({}, 'a[0].b.c', 4, noop);
20095 var func = _[methodName],
20102 QUnit.test('`_.' + methodName + '` should set property values', function(assert) {
20114 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
20129 … QUnit.test('`_.' + methodName + '` should unset symbol keyed property values', function(assert) {
20136 assert.strictEqual(_.unset(object, symbol), true);
20144 QUnit.test('`_.' + methodName + '` should set deep property values', function(assert) {
20156 QUnit.test('`_.' + methodName + '` should set a key over a path', function(assert) {
20168 QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
20177 QUnit.test('`_.' + methodName + '` should not ignore empty brackets', function(assert) {
20186 QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
20200 QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
20217 …QUnit.test('`_.' + methodName + '` should create parts of `path` that are missing', function(asser…
20233 … QUnit.test('`_.' + methodName + '` should not error when `object` is nullish', function(assert) {
20250 QUnit.test('`_.' + methodName + '` should overwrite primitives in the path', function(assert) {
20261 …QUnit.test('`_.' + methodName + '` should not create an array for missing non-index property names…
20270 …QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destination…
20302 assert.notStrictEqual(_.shuffle(array), array);
20308 assert.deepEqual(_.shuffle(array).sort(), array);
20309 assert.deepEqual(_.shuffle(object).sort(), array);
20316 return _.shuffle([1, 2]);
20325 assert.deepEqual(_.shuffle(1), []);
20339 assert.strictEqual(_.size({ 'one': 1, 'two': 2, 'three': 3 }), 3);
20345 assert.strictEqual(_.size(array), 3);
20355 return index ? _.size(object) : _.size();
20365 assert.strictEqual(_.size(args), 3);
20376 assert.strictEqual(_.size(new Foo(array)), 3);
20386 assert.strictEqual(_.size(map), 2);
20402 assert.strictEqual(_.size(set), 2);
20414 assert.strictEqual(_.size({ 'length': -1 }), 1);
20420 assert.strictEqual(_.size({ 'length': MAX_SAFE_INTEGER + 1 }), 1);
20426 assert.strictEqual(_.size({ 'length': '0' }), 1);
20440 var actual = _.slice(array);
20448 assert.deepEqual(_.slice(array, 1), [2, 3]);
20449 assert.deepEqual(_.slice(array, 1, 3), [2, 3]);
20456 assert.deepEqual(_.slice(array, start), []);
20466 return _.slice(array, start);
20475 assert.deepEqual(_.slice(array, -1), [3]);
20482 assert.deepEqual(_.slice(array, start), array);
20490 assert.deepEqual(_.slice(array, start, 2), []);
20497 assert.deepEqual(_.slice(array, 0, 1), [1]);
20504 assert.deepEqual(_.slice(array, 0, end), array);
20516 return index ? _.slice(array, 0, end) : _.slice(array, 0);
20525 assert.deepEqual(_.slice(array, 0, -1), [1, 2]);
20532 assert.deepEqual(_.slice(array, 0, end), []);
20542 return _.slice.apply(_, [array].concat(pos));
20548 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
20552 actual = lodashStable.map(array, _.slice);
20564 wrapped = _(array);
20606 assert.strictEqual(_.some([false, 1, ''], identity), true);
20607 assert.strictEqual(_.some([null, 'a', 0], identity), true);
20617 return _.some(value, identity);
20629 assert.strictEqual(_.some([null, true, null], function(value) {
20640 assert.strictEqual(_.some([false, false, false], identity), false);
20641 assert.strictEqual(_.some([null, 0, ''], identity), false);
20644 QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
20652 return index ? _.some(array, value) : _.some(array);
20660 return index ? _.some(array, value) : _.some(array);
20666 QUnit.test('should work with `_.property` shorthands', function(assert) {
20670 assert.strictEqual(_.some(objects, 'a'), false);
20671 assert.strictEqual(_.some(objects, 'b'), true);
20674 QUnit.test('should work with `_.matches` shorthands', function(assert) {
20678 assert.strictEqual(_.some(objects, { 'a': 0 }), true);
20679 assert.strictEqual(_.some(objects, { 'b': 2 }), false);
20682 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
20685 var actual = lodashStable.map([[1]], _.some);
20705 var actual = lodashStable.map(_.sortBy(objects, function(object) {
20712 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
20720 return index ? _.sortBy(array, value) : _.sortBy(array);
20726 QUnit.test('should work with `_.property` shorthands', function(assert) {
20729 var actual = lodashStable.map(_.sortBy(objects.concat(undefined), 'b'), 'b');
20736 var actual = _.sortBy({ 'a': 1, 'b': 2, 'c': 3 }, Math.sin);
20748 assert.deepEqual(_.sortBy(array), expected);
20753 assert.deepEqual(_.sortBy(array), expected);
20759 assert.deepEqual(_.sortBy(1), []);
20765 var actual = _.sortBy(objects, function(object) {
20774 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
20777 var actual = lodashStable.map([[2, 1, 3], [3, 2, 1]], _.sortBy);
20787 var func = _[methodName];
20817 …QUnit.test('`_.' + methodName + '` should sort multiple properties in ascending order', function(a…
20824 QUnit.test('`_.' + methodName + '` should support iteratees', function(assert) {
20831 …QUnit.test('`_.' + methodName + '` should perform a stable sort (test in IE > 8 and V8)', function…
20840 QUnit.test('`_.' + methodName + '` should not error on nullish elements', function(assert) {
20850 …QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', functi…
20883 var func = _[methodName],
20886 QUnit.test('`_.' + methodName + '` should return the insert index', function(assert) {
20900 QUnit.test('`_.' + methodName + '` should work with an array of strings', function(assert) {
20914 …QUnit.test('`_.' + methodName + '` should accept a nullish `array` and a `value`', function(assert…
20927 QUnit.test('`_.' + methodName + '` should align with `_.sortBy`', function(assert) {
20939 assert.deepEqual(_.sortBy(array), expected);
20948 QUnit.test('`_.' + methodName + '` should align with `_.sortBy` for nulls', function(assert) {
20958 QUnit.test('`_.' + methodName + '` should align with `_.sortBy` for symbols', function(assert) {
20977 var func = _[methodName],
20980 …QUnit.test('`_.' + methodName + '` should provide correct `iteratee` arguments', function(assert) {
20992 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
21001 …QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', func…
21034 var func = _[methodName],
21037 QUnit.test('`_.' + methodName + '` should perform a binary search', function(assert) {
21056 assert.deepEqual(_.sortedUniq(array), expected);
21070 assert.deepEqual(_.split(string, 'c'), ['ab', 'de']);
21071 assert.deepEqual(_.split(string, /[bd]/), ['a', 'c', 'e']);
21072 assert.deepEqual(_.split(string, '', 2), ['a', 'b']);
21082 return index ? _.split(value) : _.split();
21088 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
21092 actual = lodashStable.map(strings, _.split);
21101 var wrapped = _('abc');
21122 var spread = _.spread(fn),
21132 var spread = _.spread(stubTrue),
21147 var spread = _.spread(fn, 1),
21161 var spread = _.spread(fn, value);
21171 var spread = _.spread(fn, 1.6),
21187 assert.strictEqual(_.startCase('--foo-bar--'), 'Foo Bar');
21188 assert.strictEqual(_.startCase('fooBar'), 'Foo Bar');
21189 assert.strictEqual(_.startCase('__FOO_BAR__'), 'FOO BAR');
21203 assert.strictEqual(_.startsWith(string, 'a'), true);
21209 assert.strictEqual(_.startsWith(string, 'b'), false);
21215 assert.strictEqual(_.startsWith(string, 'b', 1), true);
21222 assert.strictEqual(_.startsWith(string, 'a', position), false);
21232 return _.startsWith(string, 'a', position);
21242 assert.strictEqual(_.startsWith(string, 'a', position), true);
21243 assert.strictEqual(_.startsWith(string, 'b', position), false);
21250 assert.strictEqual(_.startsWith(string, 'bc', 1.2), true);
21259 var func = _[methodName],
21265 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
21272 QUnit.test('`_.' + methodName + '` should coerce `target` to a string', function(assert) {
21279 QUnit.test('`_.' + methodName + '` should coerce `position` to a number', function(assert) {
21304 var func = _[methodName];
21318 QUnit.test('`_.' + methodName + '` should return ' + pair[1], function(assert) {
21340 assert.strictEqual(_.subtract(6, 4), 2);
21341 assert.strictEqual(_.subtract(-6, 4), -10);
21342 assert.strictEqual(_.subtract(-6, -4), -2);
21348 assert.strictEqual(_.subtract('6', '4'), 2);
21349 assert.deepEqual(_.subtract('x', 'y'), NaN);
21358 var func = _[methodName],
21361 …QUnit.test('`_.' + methodName + '` should return `' + (isAddSub ? 0 : 1) + '` when no arguments ar…
21367 … QUnit.test('`_.' + methodName + '` should work with only one defined argument', function(assert) {
21375 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
21391 QUnit.test('`_.' + methodName + '` should convert objects to `NaN`', function(assert) {
21398 QUnit.test('`_.' + methodName + '` should convert symbols to `NaN`', function(assert) {
21410 …QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', fun…
21414 var actual = _(1)[methodName](2);
21415 assert.notOk(actual instanceof _);
21422 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
21426 var actual = _(1).chain()[methodName](2);
21427 assert.ok(actual instanceof _);
21446 var actual = _.sumBy(objects, function(object) {
21458 _.sumBy(array, function() {
21465 QUnit.test('should work with `_.property` shorthands', function(assert) {
21469 assert.strictEqual(_.sumBy(arrays, 0), 6);
21470 assert.strictEqual(_.sumBy(objects, 'a'), 6);
21480 func = _[methodName];
21482 …QUnit.test('`_.' + methodName + '` should return the sum of an array of numbers', function(assert)…
21488 …QUnit.test('`_.' + methodName + '` should return `0` when passing empty `array` values', function(…
21500 QUnit.test('`_.' + methodName + '` should skip `undefined` values', function(assert) {
21506 QUnit.test('`_.' + methodName + '` should not skip `NaN` values', function(assert) {
21512 QUnit.test('`_.' + methodName + '` should not coerce values to numbers', function(assert) {
21533 return index ? _.tail(array) : _.tail();
21543 assert.deepEqual(_.tail(array), [2, 3]);
21549 assert.deepEqual(_.tail([]), []);
21552 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
21556 actual = lodashStable.map(array, _.tail);
21568 var actual = _(array).tail().filter(function(value) {
21579 actual = _(array).filter(function(value) {
21586 assert.deepEqual(actual, _.tail(_.filter(array, isEven)));
21601 actual = _(array).slice(0, 1).tail().map(iteratee).value();
21607 actual = _(array).filter().slice(0, 1).tail().map(iteratee).value();
21628 assert.deepEqual(_.take(array, 2), [1, 2]);
21639 return _.take(array, n);
21649 assert.deepEqual(_.take(array, n), []);
21657 assert.deepEqual(_.take(array, n), array);
21661 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
21665 actual = lodashStable.map(array, _.take);
21677 actual = _(array).take(2).take().value();
21679 assert.deepEqual(actual, _.take(_.take(array, 2)));
21681 actual = _(array).filter(predicate).take(2).take().value();
21683 assert.deepEqual(actual, _.take(_.take(_.filter(array, predicate), 2)));
21685 actual = _(array).take(6).takeRight(4).take(2).takeRight().value();
21686 assert.deepEqual(actual, _.takeRight(_.take(_.takeRight(_.take(array, 6), 4), 2)));
21690 …actual = _(array).take(array.length - 1).filter(predicate).take(6).takeRight(4).take(2).takeRight(…
21692 …assert.deepEqual(actual, _.takeRight(_.take(_.takeRight(_.take(_.filter(_.take(array, array.length…
21710 assert.deepEqual(_.takeRight(array, 2), [2, 3]);
21721 return _.takeRight(array, n);
21731 assert.deepEqual(_.takeRight(array, n), []);
21739 assert.deepEqual(_.takeRight(array, n), array);
21743 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
21747 actual = lodashStable.map(array, _.takeRight);
21759 actual = _(array).takeRight(2).takeRight().value();
21761 assert.deepEqual(actual, _.takeRight(_.takeRight(array)));
21763 actual = _(array).filter(predicate).takeRight(2).takeRight().value();
21765 assert.deepEqual(actual, _.takeRight(_.takeRight(_.filter(array, predicate), 2)));
21767 actual = _(array).takeRight(6).take(4).takeRight(2).take().value();
21768 assert.deepEqual(actual, _.take(_.takeRight(_.take(_.takeRight(array, 6), 4), 2)));
21772 actual = _(array).filter(predicate).takeRight(6).take(4).takeRight(2).take().value();
21774 …assert.deepEqual(actual, _.take(_.takeRight(_.take(_.takeRight(_.filter(array, predicate), 6), 4),…
21798 var actual = _.takeRightWhile(array, function(n) {
21810 _.takeRightWhile(array, function() {
21817 QUnit.test('should work with `_.matches` shorthands', function(assert) {
21820 assert.deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2));
21823 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
21826 assert.deepEqual(_.takeRightWhile(objects, ['b', 2]), objects.slice(2));
21829 QUnit.test('should work with `_.property` shorthands', function(assert) {
21832 assert.deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1));
21841 expected = _.takeRightWhile(array, predicate),
21842 wrapped = _(array).takeRightWhile(predicate);
21846 assert.strictEqual(wrapped.last(), _.last(expected));
21866 _(array).slice(1).takeRightWhile(function(value, index, array) {
21872 _(array).slice(1).map(square).takeRightWhile(function(value, index, array) {
21878 _(array).slice(1).map(square).takeRightWhile(function(value, index) {
21884 _(array).slice(1).map(square).takeRightWhile(function(index) {
21890 _(array).slice(1).map(square).takeRightWhile(function() {
21918 var actual = _.takeWhile(array, function(n) {
21930 _.takeWhile(array, function() {
21937 QUnit.test('should work with `_.matches` shorthands', function(assert) {
21940 assert.deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1));
21943 QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
21946 assert.deepEqual(_.takeWhile(objects, ['b', 2]), objects.slice(0, 1));
21948 QUnit.test('should work with `_.property` shorthands', function(assert) {
21951 assert.deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2));
21960 expected = _.takeWhile(array, predicate),
21961 wrapped = _(array).takeWhile(predicate);
21965 assert.strictEqual(wrapped.last(), _.last(expected));
21978 var actual = _(array)
21999 _(array).slice(1).takeWhile(function(value, index, array) {
22005 _(array).slice(1).map(square).takeWhile(function(value, index, array) {
22011 _(array).slice(1).map(square).takeWhile(function(value, index) {
22017 _(array).slice(1).map(square).takeWhile(function(value) {
22023 _(array).slice(1).map(square).takeWhile(function() {
22047 var actual = _.tap(array, function(value) {
22066 var wrapped = _(array).tap(function(value) {
22071 assert.ok(wrapped instanceof _);
22095 return _.template(string)(data);
22101 …QUnit.test('should not reference `_.escape` when "escape" delimiters are not used', function(asser…
22104 var compiled = _.template('<%= typeof __e %>');
22111 var compiled = _.template(
22127 …var compiled = _.template('<% // A code comment. %><% if (value) { %>yap<% } else { %>nope<% } %>'…
22136 var compiled = _.template('<% var b = a; %><%= b.value %>'),
22150 return _.template(string)(data);
22159 var compiled = _.template('<%= a ? "a=\\"A\\"" : "" %>'),
22168 var compiled = _.template('<%= value ? value : "b" %>'),
22177 var compiled = _.template('<%= typeof Math.abs %>');
22214 var compiled = _.template(key),
22225 assert.strictEqual(_.template('1${value}3')(data), '123');
22226 assert.strictEqual(_.template('${"{" + value + "\\}"}')(data), '{2}');
22232 var compiled = _.template('<%= a %>', { 'imports': { 'a': 1 } });
22239 var compiled = _.template(
22240 '<% _.each( data.a, function( value ) { %>' +
22258 var settingsClone = lodashStable.clone(_.templateSettings);
22260 var settings = lodashStable.assign(index ? _.templateSettings : {}, {
22267 …compiled = _.template('<ul>{{ _.each(collection, function(value, index) {}}<li>{{= index }}: {{- v…
22271 lodashStable.assign(_.templateSettings, settingsClone);
22279 var settingsClone = lodashStable.clone(_.templateSettings);
22281 var settings = lodashStable.assign(index ? _.templateSettings : {}, {
22288 …compiled = _.template('<ul><? _.each(collection, function(value, index) { ?><li><?= index ?>: <?- …
22292 lodashStable.assign(_.templateSettings, settingsClone);
22299 …var compiled = _.template('<%= index %><%= collection[index] %><% _.each(collection, function(valu…
22305 QUnit.test('should use `_.templateSettings.imports._.templateSettings`', function(assert) {
22308 var lodash = _.templateSettings.imports._,
22315 var compiled = _.template('{{= a }}');
22325 QUnit.test('should fallback to `_.templateSettings`', function(assert) {
22328 var lodash = _.templateSettings.imports._,
22329 delimiter = _.templateSettings.interpolate;
22331 _.templateSettings.imports._ = { 'escape': lodashStable.escape };
22332 _.templateSettings.interpolate = /\{\{=([\s\S]+?)\}\}/g;
22334 var compiled = _.template('{{= a }}');
22337 _.templateSettings.imports._ = lodash;
22338 _.templateSettings.interpolate = delimiter;
22360 compiled = _.template(value + ' <%- a %> <% print(a) %> <%= a %>', settings),
22371 assert.strictEqual(_.template(expected)({}), expected);
22377 var compiled = _.template('a<%= this.String("b") %>c');
22381 object.compiled = _.template('A<%= this.b %>C', { 'variable': 'obj' });
22388 var compiled = _.template('<%= a %> \\b'),
22397 var compiled = _.template('<% print("\'\\n\\r\\t\\u2028\\u2029\\\\") %>');
22401 compiled = _.template('\'\n\r\t<%= a %>\u2028\u2029\\"');
22408 var compiled = _.template('\u2028<%= "\\u2028\\u2029" %>\u2029');
22415 var compiled = _.template("<%\
22428 var compiled = _.template('<%\n\
22440 var compiled = _.template('<span class="icon-<%= type %>2"></span>'),
22450 compiled = _.template('<%= func("a") %><%- func("b") %><% func("c") %>'),
22460 var compiled = _.template('<<\n a \n>>', { 'evaluate': /<<(.*?)>>/g });
22467 var compiled = _.template('<%= a %><%- a %>'),
22476 compiled = _.template('<%= a.b %><%- a.b %>');
22488 var compiled = index ? _.template(value) : _.template();
22499 compiled = _.template(expected, { 'evaluate': /<<(.+?)>>/g }),
22508 var compiled = _.template('<%= a %><% a = _.template(c)(obj) %><%= a %>'),
22520 assert.strictEqual(_.template(object)(data), '1');
22527 _.template('', options);
22531 QUnit.test('should not modify `_.templateSettings` when `options` are given', function(assert) {
22536 assert.notOk('a' in _.templateSettings);
22537 _.template('', {}, data);
22538 assert.notOk('a' in _.templateSettings);
22540 delete _.templateSettings.a;
22546 _.template('')(1);
22549 _.template('', 1)(1);
22556 var compiled = _.template('x'),
22571 _.template('<% if x %>');
22582 compiled = _.template('x', options),
22586 _.template('<% if x %>', options);
22599 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
22603 compiles = lodashStable.map(array, _.template),
22624 assert.strictEqual(_.truncate(string), 'hi-diddly-ho there, neighbo...');
22630 assert.strictEqual(_.truncate(string, { 'length': string.length }), string);
22631 assert.strictEqual(_.truncate(string, { 'length': string.length + 2 }), string);
22637 assert.strictEqual(_.truncate(string, { 'length': 24 }), 'hi-diddly-ho there, n...');
22643 …assert.strictEqual(_.truncate(string, { 'omission': ' [...]' }), 'hi-diddly-ho there, neig [...]');
22649 … assert.strictEqual(_.truncate(string, { 'omission': null }), 'hi-diddly-ho there, neighbnull');
22650 …assert.strictEqual(_.truncate(string, { 'omission': undefined }), 'hi-diddly-ho there, nundefined'…
22656 assert.strictEqual(_.truncate(string, { 'length': 4 }), 'h...');
22662 …assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': ' ' }), 'hi-diddly-ho there,...…
22663 …assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': /,? +/ }), 'hi-diddly-ho there.…
22664 …assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': /,? +/g }), 'hi-diddly-ho there…
22671 assert.strictEqual(_.truncate(string, { 'length': length }), '...');
22680 …assert.strictEqual(_.truncate(string, { 'length': { 'valueOf': lodashStable.constant(length) } }),…
22687 assert.strictEqual(_.truncate(Object(string), { 'length': 4 }), 'h...');
22688 …assert.strictEqual(_.truncate({ 'toString': lodashStable.constant(string) }, { 'length': 5 }), 'hi…
22691 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
22694 var actual = lodashStable.map([string, string, string], _.truncate),
22712 throttled = _.throttle(function() { callCount++; }, 32);
22732 var throttled = _.throttle(identity, 32),
22757 var lodash = _.runInContext({
22787 throttled = _.throttle(function() { callCount++; }, 32);
22807 throttled = _.throttle(function() { callCount++; }, 32, options);
22828 var throttled = _.throttle(function() {
22855 throttled = _.throttle(function() { callCount++; }, 32, {});
22870 var withLeading = _.throttle(identity, 32, { 'leading': true });
22873 var withoutLeading = _.throttle(identity, 32, { 'leading': false });
22885 var withTrailing = _.throttle(function(value) {
22890 var withoutTrailing = _.throttle(function(value) {
22915 var throttled = _.throttle(function() {
22942 var lodash = _.runInContext({
22976 var func = _[methodName],
22979 …QUnit.test('`_.' + methodName + '` should not error for non-object `options` values', function(ass…
22986 QUnit.test('`_.' + methodName + '` should use a default `wait` of `0`', function(assert) {
23003 …QUnit.test('`_.' + methodName + '` should invoke `func` with the correct `this` binding', function…
23022 QUnit.test('`_.' + methodName + '` supports recursive calls', function(assert) {
23053 …QUnit.test('`_.' + methodName + '` should work if the system time is set backwards', function(asse…
23062 var lodash = _.runInContext({
23090 QUnit.test('`_.' + methodName + '` should support cancelling delayed calls', function(assert) {
23110 … QUnit.test('`_.' + methodName + '` should reset `lastCalled` after cancelling', function(assert) {
23133 QUnit.test('`_.' + methodName + '` should support flushing delayed calls', function(assert) {
23153 …QUnit.test('`_.' + methodName + '` should noop `cancel` and `flush` when nothing is queued', funct…
23180 assert.deepEqual(_.times(n), []);
23187 var actual = _.times(2.6, _.identity);
23196 _.times(1, function(assert) {
23203 QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
23210 return index ? _.times(3, value) : _.times(3);
23219 assert.deepEqual(_.times(3, doubled), [0, 2, 4]);
23229 return index ? _.times(value) : _.times();
23239 assert.deepEqual(_(3).times(), [0, 1, 2]);
23250 assert.ok(_(3).chain().times() instanceof _);
23266 assert.deepEqual(_.toArray({ 'a': 1, 'b': 2 }), [1, 2]);
23276 assert.deepEqual(_.toArray(object), ['a']);
23290 assert.deepEqual(_.toArray(map), [['a', 1], ['b', 2]]);
23300 assert.deepEqual(_.toArray(''), []);
23301 assert.deepEqual(_.toArray('ab'), ['a', 'b']);
23302 assert.deepEqual(_.toArray(Object('ab')), ['a', 'b']);
23315 var actual = _(array).slice(1).map(String).toArray().value();
23318 actual = _(object).toArray().slice(1).map(String).value();
23319 assert.deepEqual(actual, _.map(_.toArray(object).slice(1), String));
23335 assert.deepEqual(_.toLower('--Foo-Bar--'), '--foo-bar--');
23336 assert.deepEqual(_.toLower('fooBar'), 'foobar');
23337 assert.deepEqual(_.toLower('__FOO_BAR__'), '__foo_bar__');
23349 assert.deepEqual(_.toUpper('--Foo-Bar'), '--FOO-BAR');
23350 assert.deepEqual(_.toUpper('fooBar'), 'FOOBAR');
23351 assert.deepEqual(_.toUpper('__FOO_BAR__'), '__FOO_BAR__');
23361 func = _[methodName];
23363 QUnit.test('`_.' + methodName + '` should return a dense array', function(assert) {
23376 …QUnit.test('`_.' + methodName + '` should treat array-like objects like arrays', function(assert) {
23384 QUnit.test('`_.' + methodName + '` should return a shallow clone of arrays', function(assert) {
23392 …QUnit.test('`_.' + methodName + '` should work with a node list for `collection`', function(assert…
23413 var func = _[methodName],
23416 QUnit.test('`_.' + methodName + '` should convert values to integers', function(assert) {
23429 QUnit.test('`_.' + methodName + '` should support `value` of `-0`', function(assert) {
23444 assert.strictEqual(_.toLength(-1), 0);
23445 assert.strictEqual(_.toLength('1'), 1);
23446 assert.strictEqual(_.toLength(1.1), 1);
23447 assert.strictEqual(_.toLength(MAX_INTEGER), MAX_ARRAY_LENGTH);
23453 assert.strictEqual(_.toLength(0), 0);
23454 assert.strictEqual(_.toLength(3), 3);
23455 assert.strictEqual(_.toLength(MAX_ARRAY_LENGTH), MAX_ARRAY_LENGTH);
23461 assert.strictEqual(1 / _.toLength(-0), Infinity);
23470 var func = _[methodName];
23472 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
23492 var func = _[methodName],
23510 QUnit.test('`_.' + methodName + '` should pass thru primitive number values', function(assert) {
23524 …QUnit.test('`_.' + methodName + '` should convert number primitives and objects to numbers', funct…
23555 …QUnit.test('`_.' + methodName + '` should convert string primitives and objects to numbers', funct…
23596 …QUnit.test('`_.' + methodName + '` should convert binary/octal strings to numbers', function(asser…
23617 …QUnit.test('`_.' + methodName + '` should convert invalid binary/octal strings to `' + (isToNumber…
23636 …QUnit.test('`_.' + methodName + '` should convert symbols to `' + (isToNumber ? 'NaN' : '0') + '`'…
23655 …QUnit.test('`_.' + methodName + '` should convert empty values to `0` or `NaN`', function(assert) {
23671 QUnit.test('`_.' + methodName + '` should coerce objects to numbers', function(assert) {
23731 assert.strictEqual(_.entries, _.toPairs);
23743 assert.strictEqual(_.entriesIn, _.toPairsIn);
23752 var func = _[methodName],
23755 …QUnit.test('`_.' + methodName + '` should create an array of string keyed-value pairs', function(a…
23764 …QUnit.test('`_.' + methodName + '` should ' + (isToPairs ? 'not ' : '') + 'include inherited strin…
23778 …QUnit.test('`_.' + methodName + '` should convert objects with a `length` property', function(asse…
23787 QUnit.test('`_.' + methodName + '` should convert maps', function(assert) {
23801 QUnit.test('`_.' + methodName + '` should convert sets', function(assert) {
23815 QUnit.test('`_.' + methodName + '` should convert strings', function(assert) {
23833 assert.deepEqual(_.toPath('a.b.c'), ['a', 'b', 'c']);
23834 assert.deepEqual(_.toPath('a[0].b.c'), ['a', '0', 'b', 'c']);
23843 var actual = _.toPath(value);
23852 assert.notStrictEqual(_.toPath('a.b.c'), _.toPath('a.b.c'));
23861 var actual = _.toPath(value);
23873 var actual = _.toPath('a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g');
23881 assert.deepEqual(_.toPath('.a'), expected);
23882 assert.deepEqual(_.toPath('[].a'), expected);
23885 assert.deepEqual(_.toPath('..a'), expected);
23886 assert.deepEqual(_.toPath('[][].a'), expected);
23889 assert.deepEqual(_.toPath('a..b'), expected);
23890 assert.deepEqual(_.toPath('a[].b'), expected);
23893 assert.deepEqual(_.toPath('a...b'), expected);
23894 assert.deepEqual(_.toPath('a[][].b'), expected);
23897 assert.deepEqual(_.toPath('a.'), expected);
23898 assert.deepEqual(_.toPath('a[]'), expected);
23901 assert.deepEqual(_.toPath('a..'), expected);
23902 assert.deepEqual(_.toPath('a[][]'), expected);
23919 var actual = lodashStable.assign({ 'a': 1 }, _.toPlainObject(new Foo));
23926 var actual = _.toPlainObject(args),
23935 var actual = _.toPlainObject(['a', 'b', 'c']),
23954 return index ? _.toString(value) : _.toString();
23965 actual = lodashStable.map(values, _.toString);
23974 assert.deepEqual(_.toString(values), '-0,-0,0,0');
23982 assert.strictEqual(_.toString(symbol), 'Symbol(a)');
23997 assert.strictEqual(_.toString([symbol]), 'Symbol(a)');
24011 var wrapped = _([1, 2, 3]);
24043 return index ? _.transform(object, iteratee, accumulator) : _.transform(object, iteratee);
24080 return lodashStable.isArray(_.transform(array, noop));
24093 return _.transform(value, function(result, value) {
24104 return _.transform(value, function(result, value, key) {
24113 return _.transform(value, noop, accumulator);
24120 assert.strictEqual(_.transform(null, null, accumulator), accumulator);
24127 var actual = _.transform(Array(1), function(result, value, index) {
24137 assert.ok(_.transform(new Foo) instanceof Foo);
24148 return _.transform(value);
24166 assert.notOk(_.transform(new Foo) instanceof Foo);
24176 return index ? _.transform(object) : _.transform();
24192 _.transform(object, function() {
24218 result = _.transform(object);
24238 var func = _[methodName],
24249 QUnit.test('`_.' + methodName + '` should remove ' + parts + ' whitespace', function(assert) {
24258 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
24267 QUnit.test('`_.' + methodName + '` should remove ' + parts + ' `chars`', function(assert) {
24270 var string = '-_-a-b-c-_-',
24271 expected = (index == 2 ? '-_-' : '') + 'a-b-c' + (index == 1 ? '-_-' : '');
24273 assert.strictEqual(func(string, '_-'), expected);
24276 QUnit.test('`_.' + methodName + '` should coerce `chars` to a string', function(assert) {
24279 var object = { 'toString': lodashStable.constant('_-') },
24280 string = '-_-a-b-c-_-',
24281 expected = (index == 2 ? '-_-' : '') + 'a-b-c' + (index == 1 ? '-_-' : '');
24286 …QUnit.test('`_.' + methodName + '` should return an empty string for empty values and `chars`', fu…
24289 lodashStable.each([null, '_-'], function(chars) {
24296 …QUnit.test('`_.' + methodName + '` should work with `undefined` or empty string values for `chars`…
24306 …QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(…
24316 …QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', fun…
24323 assert.strictEqual(_(string)[methodName](), expected);
24330 …QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', functi…
24335 assert.ok(_(string).chain()[methodName]() instanceof _);
24363 var allHearts = _.repeat(hearts, 10),
24369 assert.strictEqual(_.camelCase(hearts + ' the ' + leafs), hearts + 'The' + leafs);
24370 assert.strictEqual(_.camelCase(string), 'a' + leafs + comboGlyph + 'And' + rocket);
24371 assert.strictEqual(_.capitalize(rocket), rocket);
24373 assert.strictEqual(_.pad(string, 16), ' ' + string + ' ');
24374 assert.strictEqual(_.padStart(string, 16), ' ' + string);
24375 assert.strictEqual(_.padEnd(string, 16), string + ' ');
24377 assert.strictEqual(_.pad(string, 16, chars), hearts + string + chars);
24378 assert.strictEqual(_.padStart(string, 16, chars), chars + hearts + string);
24379 assert.strictEqual(_.padEnd(string, 16, chars), string + chars + hearts);
24381 assert.strictEqual(_.size(string), 13);
24382 assert.deepEqual(_.split(string, ' '), ['A', leafs + ',', comboGlyph + ',', 'and', rocket]);
24383 assert.deepEqual(_.split(string, ' ', 3), ['A', leafs + ',', comboGlyph + ',']);
24384 assert.deepEqual(_.split(string, undefined), [string]);
24385 assert.deepEqual(_.split(string, undefined, -1), [string]);
24386 assert.deepEqual(_.split(string, undefined, 0), []);
24390 assert.deepEqual(_.split(string, ''), expected);
24391 assert.deepEqual(_.split(string, '', 6), expected.slice(0, 6));
24392 assert.deepEqual(_.toArray(string), expected);
24394 assert.strictEqual(_.trim(trimString, chars), string);
24395 assert.strictEqual(_.trimStart(trimString, chars), string + trimChars);
24396 assert.strictEqual(_.trimEnd(trimString, chars), trimChars + string);
24398 assert.strictEqual(_.truncate(string, { 'length': 13 }), string);
24399 assert.strictEqual(_.truncate(string, { 'length': 6 }), 'A ' + leafs + '...');
24401 assert.deepEqual(_.words(string), ['A', leafs, comboGlyph, 'and', rocket]);
24402 assert.deepEqual(_.toArray(hashKeycap), [hashKeycap]);
24403 assert.deepEqual(_.toArray(noMic), [noMic]);
24408 actual = _.truncate(string, options);
24413 actual = _.truncate(allHearts, options);
24431 return [_.size(value), _.toArray(value), _.words(value)];
24449 return [_.size(value), _.toArray(value), _.words(value)];
24461 assert.strictEqual(_.size(flag), 1);
24462 assert.strictEqual(_.size(regionals), 3);
24464 assert.deepEqual(_.toArray(flag), [flag]);
24465 assert.deepEqual(_.toArray(regionals), [pair[0], ' ', pair[1]]);
24467 assert.deepEqual(_.words(flag), [flag]);
24468 assert.deepEqual(_.words(regionals), [pair[0], pair[1]]);
24474 assert.strictEqual(_.size(heart), 1);
24475 assert.deepEqual(_.toArray(heart), [heart]);
24476 assert.deepEqual(_.words(heart), [heart]);
24491 return [_.size(value), _.toArray(value), _.words(value)];
24503 assert.strictEqual(_.size(surrogates), 3);
24504 assert.deepEqual(_.toArray(surrogates), [pair[0], ' ', pair[1]]);
24505 assert.deepEqual(_.words(surrogates), []);
24512 assert.deepEqual(_.toArray(string), [fitzModifiers[0], fitzModifiers[0]]);
24528 var actual = lodashStable.map(['6', '8', '10'], _.unary(parseInt));
24535 var capped = _.unary(fn);
24542 var capped = _.unary(function(a, b) { return this; }),
24563 assert.strictEqual(_.unescape('&amp;lt;'), '&lt;');
24569 assert.strictEqual(_.unescape(escaped), unescaped);
24575 assert.strictEqual(_.unescape('abc'), 'abc');
24578 QUnit.test('should unescape the same characters escaped by `_.escape`', function(assert) {
24581 assert.strictEqual(_.unescape(_.escape(unescaped)), unescaped);
24588 assert.strictEqual(_.unescape(entity), entity);
24598 var func = _[methodName];
24600 QUnit.test('`_.' + methodName + '` should return the union of two arrays', function(assert) {
24607 … QUnit.test('`_.' + methodName + '` should return the union of multiple arrays', function(assert) {
24614 QUnit.test('`_.' + methodName + '` should not flatten nested arrays', function(assert) {
24621 …QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects…
24639 var actual = _.unionBy([2.1], [1.2, 2.3], Math.floor);
24642 actual = _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
24651 _.unionBy([2.1], [1.2, 2.3], function() {
24661 var actual = _.unionBy([{ 'x': 1, 'y': 1 }], [{ 'x': 1, 'y': 2 }], 'x');
24676 actual = _.unionWith(objects, others, lodashStable.isEqual);
24687 var actual = _.unionWith(objects, others, function(a, b) {
24700 var func = _[methodName],
24705 objects = _.sortBy(objects, 'a');
24708 …QUnit.test('`_.' + methodName + '` should return unique values of an unsorted array', function(ass…
24715 …QUnit.test('`_.' + methodName + '` should return unique values of a sorted array', function(assert…
24722 QUnit.test('`_.' + methodName + '` should treat object instances as unique', function(assert) {
24728 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
24735 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
24741 QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
24757 …QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert)…
24768 …QUnit.test('`_.' + methodName + '` should work with large arrays of boolean, `NaN`, and nullish va…
24784 QUnit.test('`_.' + methodName + '` should work with large arrays of symbols', function(assert) {
24796 …QUnit.test('`_.' + methodName + '` should work with large arrays of well-known symbols', function(…
24827 …QUnit.test('`_.' + methodName + '` should distinguish between numbers and numeric strings', functi…
24849 …QUnit.test('should perform an unsorted uniq when used as an iteratee for methods like `_.map`', fu…
24864 var func = _[methodName],
24869 objects = _.sortBy(objects, 'a');
24871 QUnit.test('`_.' + methodName + '` should work with an `iteratee`', function(assert) {
24895 …QUnit.test('`_.' + methodName + '` should provide correct `iteratee` arguments', function(assert) {
24907 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
24932 …QUnit.test('`_.' + methodName + '` should work with ' + key + ' for `iteratee`', function(assert) {
24950 actual = _.uniqWith(objects, lodashStable.isEqual);
24966 return lodashStable.map(_.uniqWith(array, lodashStable.eq), lodashStable.toString);
24982 return _.uniqueId();
24991 assert.strictEqual(typeof _.uniqueId(), 'string');
24997 var actual = [_.uniqueId(3), _.uniqueId(2), _.uniqueId(1)];
25012 assert.strictEqual(_.unset(object, path), true);
25025 return [_.unset(object, key), lodashStable.toString(key) in object];
25038 assert.strictEqual(_.unset(object, symbol), true);
25051 assert.strictEqual(_.unset(object, path), true);
25066 assert.strictEqual(_.unset(object, path), true);
25077 assert.strictEqual(_.unset(object, path), true);
25091 return [_.unset(value, 'a.b'), _.unset(value, ['a', 'b'])];
25109 var actual = _.unset(0, path);
25119 var actual = _.unset(object, path);
25139 assert.strictEqual(_.unset(object, 'a'), false);
25157 var actual = _.unzipWith(array, function(a, b, c) {
25169 _.unzipWith([[1, 3, 5], [2, 4, 6]], function() {
25181 expected = lodashStable.map(values, lodashStable.constant(_.unzip(array)));
25184 return index ? _.unzipWith(array, value) : _.unzipWith(array);
25199 var actual = _.updateWith({ '0': {} }, '[0][1][2]', stubThree, function(value) {
25209 var actual = _.updateWith({}, 'a[0].b.c', stubFour, noop);
25219 var func = _[methodName],
25222 …QUnit.test('`_.' + methodName + '` should invoke `updater` with the value on `path` of `object`', …
25248 assert.strictEqual(_.upperCase('--foo-bar--'), 'FOO BAR');
25249 assert.strictEqual(_.upperCase('fooBar'), 'FOO BAR');
25250 assert.strictEqual(_.upperCase('__foo_bar__'), 'FOO BAR');
25262 assert.strictEqual(_.upperFirst('fred'), 'Fred');
25263 assert.strictEqual(_.upperFirst('Fred'), 'Fred');
25264 assert.strictEqual(_.upperFirst('FRED'), 'FRED');
25273 var func = _[methodName],
25276 … QUnit.test('`_.' + methodName + '` should get string keyed values of `object`', function(assert) {
25285 …QUnit.test('`_.' + methodName + '` should work with an object that has a `length` property', funct…
25294 …QUnit.test('`_.' + methodName + '` should ' + (isValues ? 'not ' : '') + 'include inherited string…
25308 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
25330 var actual = _.without([2, 1, 2, 3], 1, 2);
25341 assert.deepEqual(_.without(array, { 'a': 1 }), array);
25342 assert.deepEqual(_.without(array, object1), [object2]);
25349 assert.deepEqual(_.without(array, 1, 2), [3, 3]);
25366 return _.words(letter);
25375 assert.deepEqual(_.words('abcd', /ab|cd/g), ['ab', 'cd']);
25376 assert.deepEqual(_.words('abcd', 'ab|cd'), ['ab']);
25382 assert.deepEqual(_.words('12ft'), ['12', 'ft']);
25383 assert.deepEqual(_.words('aeiouAreVowels'), ['aeiou', 'Are', 'Vowels']);
25384 assert.deepEqual(_.words('enable 6h format'), ['enable', '6', 'h', 'format']);
25385 assert.deepEqual(_.words('enable 24H format'), ['enable', '24', 'H', 'format']);
25386 assert.deepEqual(_.words('isISO8601'), ['is', 'ISO', '8601']);
25387 assert.deepEqual(_.words('LETTERSAeiouAreVowels'), ['LETTERS', 'Aeiou', 'Are', 'Vowels']);
25388 assert.deepEqual(_.words('tooLegit2Quit'), ['too', 'Legit', '2', 'Quit']);
25389 assert.deepEqual(_.words('walk500Miles'), ['walk', '500', 'Miles']);
25390 assert.deepEqual(_.words('xhr2Request'), ['xhr', '2', 'Request']);
25391 assert.deepEqual(_.words('XMLHttp'), ['XML', 'Http']);
25392 assert.deepEqual(_.words('XmlHTTP'), ['Xml', 'HTTP']);
25393 assert.deepEqual(_.words('XmlHttp'), ['Xml', 'Http']);
25399 assert.deepEqual(_.words('LETTERSÆiouAreVowels'), ['LETTERS', 'Æiou', 'Are', 'Vowels']);
25400 assert.deepEqual(_.words('æiouAreVowels'), ['æiou', 'Are', 'Vowels']);
25401 assert.deepEqual(_.words('æiou2Consonants'), ['æiou', '2', 'Consonants']);
25413 return _.words(string[index ? 'toUpperCase' : 'toLowerCase']());
25439 return _.words(words[0]);
25451 actual = lodashStable.map(operators, _.words);
25466 actual = lodashStable.map(marks, _.words);
25471 QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
25475 actual = lodashStable.map(strings, _.words);
25484 largeWord = _.repeat('A', largeWordLen),
25488 assert.deepEqual(_.words(largeWord + 'ÆiouAreVowels'), [largeWord, 'Æiou', 'Are', 'Vowels']);
25505 var p = _.wrap(lodashStable.escape, function(func, text) {
25517 var wrapped = _.wrap(noop, function() {
25525 QUnit.test('should use `_.identity` when `wrapper` is nullish', function(assert) {
25532 var wrapped = index ? _.wrap('a', value) : _.wrap('a');
25542 var p = _.wrap(lodashStable.escape, function(func) {
25556 var func = _[methodName];
25558 …QUnit.test('`_.' + methodName + '` should return the symmetric difference of two arrays', function…
25565 …QUnit.test('`_.' + methodName + '` should return the symmetric difference of multiple arrays', fun…
25575 …QUnit.test('`_.' + methodName + '` should return an empty array when comparing the same array', fu…
25584 QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
25594 …QUnit.test('`_.' + methodName + '` should return a new array when a single array is given', functi…
25601 …QUnit.test('`_.' + methodName + '` should ignore individual secondary arguments', function(assert)…
25608 …QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects…
25617 …QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
25621 var wrapped = _([1, 2, 3])[methodName]([5, 2, 1, 4]);
25622 assert.ok(wrapped instanceof _);
25629 …QUnit.test('`_.' + methodName + '` should work when in a lazy sequence before `head` or `last`', f…
25634 wrapped = _(array).slice(1)[methodName]([LARGE_ARRAY_SIZE, LARGE_ARRAY_SIZE + 1]);
25656 var actual = _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
25659 actual = _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
25668 _.xorBy([2.1, 1.2], [2.3, 3.4], function() {
25686 actual = _.xorWith(objects, others, lodashStable.isEqual);
25697 var func = _[methodName],
25701 …QUnit.test('`_.' + methodName + '` should zip together key/value arrays into an object', function(…
25708 QUnit.test('`_.' + methodName + '` should ignore extra `values`', function(assert) {
25714 …QUnit.test('`_.' + methodName + '` should assign `undefined` values for extra `keys`', function(as…
25720 …QUnit.test('`_.' + methodName + '` should ' + (isDeep ? '' : 'not ') + 'support deep paths', funct…
25729 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
25735 actual = _(props)[methodName](values).map(square).filter(isEven).take().value();
25737 assert.deepEqual(actual, _.take(_.filter(_.map(func(props, values), square), isEven)));
25757 var actual = _.zipWith(array1, array2, array3, function(a, b, c) {
25763 var actual = _.zipWith(array1, [], function(a, b) {
25775 _.zipWith([1, 2], [3, 4], [5, 6], function() {
25788 expected = lodashStable.map(values, lodashStable.constant(_.zip(array1, array2)));
25791 return index ? _.zipWith(array1, array2, value) : _.zipWith(array1, array2);
25803 var func = _[methodName];
25826 QUnit.test('`_.' + methodName + '` should work with ' + key, function(assert) {
25835 …QUnit.test('`_.' + methodName + '` should work with tuples of different lengths', function(assert)…
25852 … QUnit.test('`_.' + methodName + '` should treat falsey values as empty arrays', function(assert) {
25864 …QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects…
25871 … QUnit.test('`_.' + methodName + '` should support consuming its return value', function(assert) {
25889 wrapped = _(array).push(2).push(3);
25894 assert.ok(otherWrapper instanceof _);
25907 var wrapped = _([1]).chain().commit().head();
25908 assert.ok(wrapped instanceof _);
25923 return implicit ? _(value) : _.chain(value);
25958 …QUnit.test('should use `_.toArray` to generate the iterable result ' + chainType, function(assert)…
25967 assert.deepEqual(Array.from(wrapped), _.toArray(value));
26006 …assert.deepEqual(lodashStable.toArray(wrapped), _.filter(array, isEven), 'reset for new lazy chain…
26026 wrapped1 = _(array1).thru(_.compact).map(square).takeRight(2).sort(),
26043 wrapped1 = _(array1).chain().map(square),
26059 wrapped1 = _(array1).map(square);
26083 wrapped = _(array);
26106 var result = index ? _(value).pop() : _().pop();
26129 wrapped = _(array).push(2, 3),
26148 var result = index ? _(value).push(1).value() : _().push(1).value();
26171 wrapped = _(array);
26194 var result = index ? _(value).shift() : _().shift();
26217 wrapped = _(array).sort(),
26236 var result = index ? _(value).sort().value() : _().sort().value();
26259 wrapped = _(array);
26282 var result = index ? _(value).splice(0, 1).value() : _().splice(0, 1).value();
26305 wrapped = _(array).unshift(1, 2),
26324 var result = index ? _(value).unshift(1).value() : _().unshift(1).value();
26347 wrapped = _(array).push(2).push(3);
26363 var wrapped = _(123);
26375 var wrapped = _([1, 2, 3]);
26387 var expected = _.prototype.value;
26388 assert.strictEqual(_.prototype.toJSON, expected);
26389 assert.strictEqual(_.prototype.valueOf, expected);
26410 QUnit.test('`_(...).' + methodName + '` should return a new wrapper', function(assert) {
26415 wrapped = _(array),
26418 assert.ok(actual instanceof _);
26464 QUnit.test('`_(...).' + methodName + '` should return a new wrapped value', function(assert) {
26469 wrapped = _(value),
26472 assert.ok(actual instanceof _);
26584 …QUnit.test('`_(...).' + methodName + '` should return an unwrapped value when implicitly chaining'…
26588 var actual = _()[methodName]();
26589 assert.notOk(actual instanceof _);
26596 …QUnit.test('`_(...).' + methodName + '` should return a wrapped value when explicitly chaining', f…
26600 var actual = _().chain()[methodName]();
26601 assert.ok(actual instanceof _);
26623 return '`_.' + methodName + '` should work with `arguments` objects';
26626 assert.deepEqual(_.difference(args, [null]), [1, [3], 5], message('difference'));
26627 …assert.deepEqual(_.difference(array, args), [2, 3, 4, 6], '_.difference should work with `argument…
26629 assert.deepEqual(_.union(args, [null, 6]), [1, null, [3], 5, 6], message('union'));
26630 …assert.deepEqual(_.union(array, args), array.concat([null, [3]]), '_.union should work with `argum…
26632 assert.deepEqual(_.compact(args), [1, [3], 5], message('compact'));
26633 assert.deepEqual(_.drop(args, 3), [null, 5], message('drop'));
26634 assert.deepEqual(_.dropRight(args, 3), [1, null], message('dropRight'));
26635 …assert.deepEqual(_.dropRightWhile(args,identity), [1, null, [3], null], message('dropRightWhile'));
26636 assert.deepEqual(_.dropWhile(args,identity), [null, [3], null, 5], message('dropWhile'));
26637 assert.deepEqual(_.findIndex(args, identity), 0, message('findIndex'));
26638 assert.deepEqual(_.findLastIndex(args, identity), 4, message('findLastIndex'));
26639 assert.deepEqual(_.flatten(args), [1, null, 3, null, 5], message('flatten'));
26640 assert.deepEqual(_.head(args), 1, message('head'));
26641 assert.deepEqual(_.indexOf(args, 5), 4, message('indexOf'));
26642 assert.deepEqual(_.initial(args), [1, null, [3], null], message('initial'));
26643 assert.deepEqual(_.intersection(args, [1]), [1], message('intersection'));
26644 assert.deepEqual(_.last(args), 5, message('last'));
26645 assert.deepEqual(_.lastIndexOf(args, 1), 0, message('lastIndexOf'));
26646 assert.deepEqual(_.sortedIndex(sortedArgs, 6), 3, message('sortedIndex'));
26647 assert.deepEqual(_.sortedIndexOf(sortedArgs, 5), 2, message('sortedIndexOf'));
26648 assert.deepEqual(_.sortedLastIndex(sortedArgs, 5), 3, message('sortedLastIndex'));
26649 assert.deepEqual(_.sortedLastIndexOf(sortedArgs, 1), 0, message('sortedLastIndexOf'));
26650 assert.deepEqual(_.tail(args, 4), [null, [3], null, 5], message('tail'));
26651 assert.deepEqual(_.take(args, 2), [1, null], message('take'));
26652 assert.deepEqual(_.takeRight(args, 1), [5], message('takeRight'));
26653 assert.deepEqual(_.takeRightWhile(args, identity), [5], message('takeRightWhile'));
26654 assert.deepEqual(_.takeWhile(args, identity), [1], message('takeWhile'));
26655 assert.deepEqual(_.uniq(args), [1, null, [3], 5], message('uniq'));
26656 assert.deepEqual(_.without(args, null), [1, [3], 5], message('without'));
26657 …assert.deepEqual(_.zip(args, args), [[1, 1], [null, null], [[3], [3]], [null, null], [5, 5]], mess…
26664 return '`_.' + methodName + '` should accept falsey primary arguments';
26667 assert.deepEqual(_.difference(null, array), [], message('difference'));
26668 assert.deepEqual(_.intersection(null, array), [], message('intersection'));
26669 assert.deepEqual(_.union(null, array), array, message('union'));
26670 assert.deepEqual(_.xor(null, array), array, message('xor'));
26677 return '`_.' + methodName + '` should accept falsey secondary arguments';
26680 assert.deepEqual(_.difference(array, null), array, message('difference'));
26681 assert.deepEqual(_.intersection(array, null), [], message('intersection'));
26682 assert.deepEqual(_.union(array, null), array, message('union'));
26715 var func = _[methodName];
26717 …QUnit.test('`_.' + methodName + '` should return an empty string for empty values', function(asser…
26737 var allMethods = lodashStable.reject(_.functions(_).sort(), function(methodName) {
26738 return lodashStable.startsWith(methodName, '_');
26831 func = _[methodName];
26838 root._ = oldDash;
26844 assert.deepEqual(actual, expected, '_.' + methodName + ' returns an array');
26846 assert.ok(true, '`_.' + methodName + '` accepts falsey arguments');
26851 if (!_[methodName]) {
26864 func = _[methodName];
26876 assert.ok(lodashStable.isArray(actual), '_.' + methodName + ' returns an array');
26879 …assert.strictEqual(actual === array, isPull, '_.' + methodName + ' should ' + (isPull ? '' : 'not …
26888 func = _[methodName];
26902 assert.deepEqual(actual, expected, '`_.' + methodName + '` rejects falsey arguments');
26911 func = _[methodName],
26916 var wrapper = func(_.bind(fn, object));
26917 … assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can consume a bound function');
26919 wrapper = _.bind(func(fn), object);
26920 assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can be bound');
26923 …assert.strictEqual(object.wrapper(), expected, '`_.' + methodName + '` uses the `this` of its pare…
26930 var shortNames = ['_', 'at', 'eq', 'gt', 'lt'];
26931 assert.ok(lodashStable.every(_.functions(_), function(methodName) {