mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Adjust backbone test html, and adjust underscore html to work with Lo-Dash's tweaked chain behavior.
Former-commit-id: e5042e1c2811004989e57cc1a24f690c3bab1b25
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
</script>
|
||||
<script>
|
||||
_.mixin({
|
||||
'debounce': lodash.debounce,
|
||||
'defer': lodash.defer
|
||||
'debounce': _.debounce || lodash.debounce,
|
||||
'defer': _.defer || lodash.defer
|
||||
});
|
||||
</script>
|
||||
<script src="../vendor/backbone/backbone.js"></script>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
push = arrayProto.push,
|
||||
slice = arrayProto.slice;
|
||||
|
||||
if (lodash.chain && lodash.chain().__chain__) {
|
||||
if (lodash().each().__chain__) {
|
||||
return;
|
||||
}
|
||||
lodash.mixin = function(object) {
|
||||
@@ -53,31 +53,6 @@
|
||||
|
||||
lodash.mixin(lodash);
|
||||
|
||||
lodash.chain = function(value) {
|
||||
value = new lodash(value);
|
||||
value.__chain__ = true;
|
||||
return value;
|
||||
};
|
||||
|
||||
lodash.prototype.chain = function() {
|
||||
this.__chain__ = true;
|
||||
return this;
|
||||
};
|
||||
|
||||
lodash.prototype.concat = function() {
|
||||
var result = concat.apply(this.__wrapped__, arguments);
|
||||
if (this.__chain__) {
|
||||
result = new lodash(result);
|
||||
result.__chain__ = true;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
lodash.prototype.pop = function() {
|
||||
pop.apply(this.__wrapped__, arguments);
|
||||
return this;
|
||||
};
|
||||
|
||||
// expose lodash
|
||||
window._ = lodash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user