Lines Matching refs:collection

3685     QUnit.test('should work with an object for `collection`', function(assert) {
4172 lodashStable.each([array, object], function(collection) {
4173 var curries = lodashStable.map(collection, func),
4174 expected = lodashStable.map(collection, lodashStable.constant(isCurry ? ['a', 'b'] : ['b', 'a']));
6013 QUnit.test('`_.' + methodName + '` should work with an object for `collection`', function(assert) {
6085 function(collection, key) {
6086 var values = lodashStable.toArray(collection);
6097 func(collection, resolve(values[2]), 2),
6098 func(collection, resolve(values[1]), 2)
6116 func(collection, resolve(1), fromIndex),
6117 func(collection, resolve(undefined), fromIndex),
6118 func(collection, resolve(''), fromIndex)
6131 return func(collection, resolve(values[0]), fromIndex);
6147 func(collection, resolve(values[0]), 0.1),
6148 func(collection, resolve(values[0]), NaN),
6149 func(collection, resolve(values[0]), '1')
6164 func(collection, resolve(values[2]), -1),
6165 func(collection, resolve(values[1]), -1)
6178 return func(collection, resolve(values[0]), fromIndex);
6273 function(collection, key) {
6274 var values = lodashStable.toArray(collection);
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);
6479 lodashStable.each([array, object], function(collection) {
6481 return index ? func(collection, value) : func(collection);
6488 QUnit.test('`_.' + methodName + '` should accept a falsey `collection`', function(assert) {
6493 var actual = lodashStable.map(falsey, function(collection, index) {
6495 return index ? func(collection) : func();
6502 QUnit.test('`_.' + methodName + '` should treat number values for `collection` as empty', function(assert) {
7152 QUnit.test('`_.' + methodName + '` should return the collection', function(assert) {
7746 QUnit.test('should work with an object for `collection`', function(assert) {
8180 function(collection, key) {
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 _);
8226 function(collection, key) {
8227 QUnit.test('should work with a string ' + key + ' for `collection`', function(assert) {
8230 assert.strictEqual(_.includes(collection, 'bc'), true);
8231 assert.strictEqual(_.includes(collection, 'd'), false);
8817 QUnit.test('should invoke a methods on each element of `collection`', function(assert) {
8847 QUnit.test('should work with an object for `collection`', function(assert) {
8856 QUnit.test('should treat number values for `collection` as empty', function(assert) {
12927 QUnit.test('should work with an object for `collection`', function(assert) {
13467 QUnit.test('should map values in `collection` to a new array', function(assert) {
13503 lodashStable.each([array, object], function(collection) {
13505 return index ? _.map(collection, value) : _.map(collection);
13512 QUnit.test('should accept a falsey `collection`', function(assert) {
13517 var actual = lodashStable.map(falsey, function(collection, index) {
13519 return index ? _.map(collection) : _.map();
13526 QUnit.test('should treat number values for `collection` as empty', function(assert) {
14552 QUnit.test('should return the largest value from a collection', function(assert) {
14573 QUnit.test('should work with non-numeric collection values', function(assert) {
15648 QUnit.test('should return the smallest value from a collection', function(assert) {
15669 QUnit.test('should work with non-numeric collection values', function(assert) {
17734 QUnit.test('should work with an object for `collection`', function(assert) {
18694 lodashStable.each([array, object], function(collection) {
18695 var actual = lodashStable.map(collection, func);
18796 QUnit.test('should use the first element of a collection as the default `accumulator`', function(assert) {
18858 QUnit.test('should use the last element of a collection as the default `accumulator`', function(assert) {
18922 QUnit.test('`_.' + methodName + '` should reduce a collection to a single value', function(assert) {
19989 QUnit.test('should contain elements of the collection', function(assert) {
20305 QUnit.test('should contain the same elements after a collection is shuffled', function(assert) {
20322 QUnit.test('should treat number values for `collection` as empty', function(assert) {
20733 QUnit.test('should work with an object for `collection`', function(assert) {
20756 QUnit.test('should treat number values for `collection` as empty', function(assert) {
22113 for (var key in collection) {\
22114 %><li><%= collection[key] %></li><%\
22118 var data = { 'collection': { 'a': 'A', 'b': 'B' } },
22267 compiled = _.template('<ul>{{ _.each(collection, function(value, index) {}}<li>{{= index }}: {{- value }}</li>{{}); }}</ul>', index ? null : settings),
22268 data = { 'collection': ['a & A', 'b & B'] };
22288 compiled = _.template('<ul><? _.each(collection, function(value, index) { ?><li><?= index ?>: <?- value ?></li><? }); ?></ul>', index ? null : settings),
22289 data = { 'collection': ['a & A', 'b & B'] };
22299 var compiled = _.template('<%= index %><%= collection[index] %><% _.each(collection, function(value, index) { %><%= index %><% }); %>'),
22300 actual = compiled({ 'index': 1, 'collection': ['a', 'b', 'c'] });
23392 QUnit.test('`_.' + methodName + '` should work with a node list for `collection`', function(assert) {