Rename _.contains to _.includes.

This commit is contained in:
John-David Dalton
2014-11-23 15:53:46 -08:00
parent a3083d2990
commit 82b9a0c949
4 changed files with 172 additions and 194 deletions

View File

@@ -692,40 +692,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.contains` iterating an array')
.add(buildName, '\
lodash.contains(numbers, limit - 1)'
)
.add(otherName, '\
_.contains(numbers, limit - 1)'
)
);
suites.push(
Benchmark.Suite('`_.contains` iterating an object')
.add(buildName, '\
lodash.contains(object, limit - 1)'
)
.add(otherName, '\
_.contains(object, limit - 1)'
)
);
if (lodash.contains('ab', 'ab') && _.contains('ab', 'ab')) {
suites.push(
Benchmark.Suite('`_.contains` iterating a string')
.add(buildName, '\
lodash.contains(strNumbers, "," + (limit - 1))'
)
.add(otherName, '\
_.contains(strNumbers, "," + (limit - 1))'
)
);
}
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.countBy` with `callback` iterating an array')
.add(buildName, '\
@@ -1077,6 +1043,40 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.includes` iterating an array')
.add(buildName, '\
lodash.includes(numbers, limit - 1)'
)
.add(otherName, '\
_.includes(numbers, limit - 1)'
)
);
suites.push(
Benchmark.Suite('`_.includes` iterating an object')
.add(buildName, '\
lodash.includes(object, limit - 1)'
)
.add(otherName, '\
_.includes(object, limit - 1)'
)
);
if (lodash.includes('ab', 'ab') && _.includes('ab', 'ab')) {
suites.push(
Benchmark.Suite('`_.includes` iterating a string')
.add(buildName, '\
lodash.includes(strNumbers, "," + (limit - 1))'
)
.add(otherName, '\
_.includes(strNumbers, "," + (limit - 1))'
)
);
}
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.indexBy` with `callback` iterating an array')
.add(buildName, '\