Lines Matching refs:data
50 data = ['a', 'b', 'c', 'd'],
53 Y.Array.each(data, function (item, index, array) {
56 Assert.areSame(data[index], item, 'the current item should be passed to the callback');
57 Assert.areSame(data, array, 'the array should be passed to the callback');
63 Y.Array.each(data, function () {
113 var data = ['a', 'b', 1, 0, false, null, 'a'];
115 Assert.areSame(0, Y.Array.indexOf(data, 'a'), 'should find the first match');
116 Assert.areSame(-1, Y.Array.indexOf(data, 'z'), 'should return -1 on no match');
117 Assert.areSame(2, Y.Array.indexOf(data, 1), 'should find numbers');
118 Assert.areSame(4, Y.Array.indexOf(data, false), 'should perform strict equality checks');
119 Assert.areSame(5, Y.Array.indexOf(data, null), 'should find null');
123 var data = ['a', 'b', 1, 0, false, null, 'a'];
125 Assert.areSame(0, Y.Array.indexOf(data, 'a', 0), 'should find the first match');
126 Assert.areSame(6, Y.Array.indexOf(data, 'a', 1), 'should find the 6th match');
127 Assert.areSame(-1, Y.Array.indexOf(data, 'a', 7), 'should return -1 on no match');
128 Assert.areSame(0, Y.Array.indexOf(data, 'a', -8), 'should find the first match');
129 Assert.areSame(6, Y.Array.indexOf(data, 'a', -1), 'should find the 6th match');
131 Assert.areSame(0, Y.Array.indexOf(data, 'a', 0.1), 'should convert fromIndex to an int');
132 Assert.areSame(0, Y.Array.indexOf(data, 'a', -0.1), 'should floor the absolute value of fromIndex to convert to an int');
133 Assert.areSame(6, Y.Array.indexOf(data, 'a', '1'), 'should convert string fromIndex to a number');
134 Assert.areSame(0, Y.Array.indexOf(data, 'a', undefined), 'should convert undefined fromIndex to a number');
135 Assert.areSame(0, Y.Array.indexOf(data, 'a', NaN), 'should treat NaN as 0');
136 Assert.areSame(-1, Y.Array.indexOf(data, 'a', 8), 'should return -1 on too-high fromIndex');
137 Assert.areSame(-1, Y.Array.indexOf(data, 'a', Infinity), 'should return -1 on Infinity');
138 Assert.areSame(0, Y.Array.indexOf(data, 'a', -Infinity), 'should return 0 on negative Infinity');
155 var data = [1, 2, 3],
159 Assert.isTrue(Y.Array.some(data, function (v, index, array) {
162 Assert.areSame(data[index], v, 'the current item should be passed to the callback');
163 Assert.areSame(data, array, 'the array should be passed to the callback');
172 Assert.isFalse(Y.Array.some(data, function () {