mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Move ui.isModularize lower in test-ui.js, tweak timing tests, and update lodash-es6 link in readme.
This commit is contained in:
@@ -19,7 +19,7 @@ Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences])
|
|||||||
|
|
||||||
CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.
|
CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.
|
||||||
|
|
||||||
Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://npmjs.org/package/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.
|
Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.
|
||||||
|
|
||||||
## Dive in
|
## Dive in
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,6 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// used to indicate testing a modularized build
|
|
||||||
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|node)|modularize|npm)\b/.test([location.pathname, location.search, ui.buildPath]);
|
|
||||||
|
|
||||||
// initialize controls
|
// initialize controls
|
||||||
addListener(window, 'load', function() {
|
addListener(window, 'load', function() {
|
||||||
function eventHandler(event) {
|
function eventHandler(event) {
|
||||||
@@ -168,6 +165,9 @@
|
|||||||
'loader': loader
|
'loader': loader
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// used to indicate testing a modularized build
|
||||||
|
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|node)|modularize|npm)\b/.test([location.pathname, location.search, ui.buildPath]);
|
||||||
|
|
||||||
// expose `ui`
|
// expose `ui`
|
||||||
window.ui = ui;
|
window.ui = ui;
|
||||||
|
|
||||||
|
|||||||
@@ -6962,7 +6962,7 @@
|
|||||||
var throttled = _.throttle(function(value) {
|
var throttled = _.throttle(function(value) {
|
||||||
count++;
|
count++;
|
||||||
return value;
|
return value;
|
||||||
}, 32, {});
|
}, 64, {});
|
||||||
|
|
||||||
equal(throttled('x'), 'x');
|
equal(throttled('x'), 'x');
|
||||||
equal(throttled('y'), 'x');
|
equal(throttled('y'), 'x');
|
||||||
@@ -7003,12 +7003,12 @@
|
|||||||
var withTrailing = _.throttle(function(value) {
|
var withTrailing = _.throttle(function(value) {
|
||||||
withCount++;
|
withCount++;
|
||||||
return value;
|
return value;
|
||||||
}, 64, { 'trailing': true });
|
}, 128, { 'trailing': true });
|
||||||
|
|
||||||
var withoutTrailing = _.throttle(function(value) {
|
var withoutTrailing = _.throttle(function(value) {
|
||||||
withoutCount++;
|
withoutCount++;
|
||||||
return value;
|
return value;
|
||||||
}, 64, { 'trailing': false });
|
}, 128, { 'trailing': false });
|
||||||
|
|
||||||
equal(withTrailing('x'), 'x');
|
equal(withTrailing('x'), 'x');
|
||||||
equal(withTrailing('y'), 'x');
|
equal(withTrailing('y'), 'x');
|
||||||
@@ -7020,7 +7020,7 @@
|
|||||||
equal(withCount, 2);
|
equal(withCount, 2);
|
||||||
strictEqual(withoutCount, 1);
|
strictEqual(withoutCount, 1);
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}, 256);
|
}, 512);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipTest(6);
|
skipTest(6);
|
||||||
|
|||||||
Reference in New Issue
Block a user