mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Use _.include instead of _.includes in perf.js for Underscore compat.
This commit is contained in:
20
perf/perf.js
20
perf/perf.js
@@ -1044,33 +1044,33 @@
|
|||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.includes` iterating an array')
|
Benchmark.Suite('`_.include` iterating an array')
|
||||||
.add(buildName, '\
|
.add(buildName, '\
|
||||||
lodash.includes(numbers, limit - 1)'
|
lodash.include(numbers, limit - 1)'
|
||||||
)
|
)
|
||||||
.add(otherName, '\
|
.add(otherName, '\
|
||||||
_.includes(numbers, limit - 1)'
|
_.include(numbers, limit - 1)'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.includes` iterating an object')
|
Benchmark.Suite('`_.include` iterating an object')
|
||||||
.add(buildName, '\
|
.add(buildName, '\
|
||||||
lodash.includes(object, limit - 1)'
|
lodash.include(object, limit - 1)'
|
||||||
)
|
)
|
||||||
.add(otherName, '\
|
.add(otherName, '\
|
||||||
_.includes(object, limit - 1)'
|
_.include(object, limit - 1)'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (lodash.includes('ab', 'ab') && _.includes('ab', 'ab')) {
|
if (lodash.include('ab', 'ab') && _.include('ab', 'ab')) {
|
||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.includes` iterating a string')
|
Benchmark.Suite('`_.include` iterating a string')
|
||||||
.add(buildName, '\
|
.add(buildName, '\
|
||||||
lodash.includes(strNumbers, "," + (limit - 1))'
|
lodash.include(strNumbers, "," + (limit - 1))'
|
||||||
)
|
)
|
||||||
.add(otherName, '\
|
.add(otherName, '\
|
||||||
_.includes(strNumbers, "," + (limit - 1))'
|
_.include(strNumbers, "," + (limit - 1))'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user