mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +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>
|
||||||
<script>
|
<script>
|
||||||
_.mixin({
|
_.mixin({
|
||||||
'debounce': lodash.debounce,
|
'debounce': _.debounce || lodash.debounce,
|
||||||
'defer': lodash.defer
|
'defer': _.defer || lodash.defer
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="../vendor/backbone/backbone.js"></script>
|
<script src="../vendor/backbone/backbone.js"></script>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
push = arrayProto.push,
|
push = arrayProto.push,
|
||||||
slice = arrayProto.slice;
|
slice = arrayProto.slice;
|
||||||
|
|
||||||
if (lodash.chain && lodash.chain().__chain__) {
|
if (lodash().each().__chain__) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lodash.mixin = function(object) {
|
lodash.mixin = function(object) {
|
||||||
@@ -53,31 +53,6 @@
|
|||||||
|
|
||||||
lodash.mixin(lodash);
|
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
|
// expose lodash
|
||||||
window._ = lodash;
|
window._ = lodash;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user