mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Expose wrapper.prototype as _.prototype
This commit is contained in:
@@ -670,6 +670,9 @@
|
|||||||
// underscore functions. Wrapped objects may be chained.
|
// underscore functions. Wrapped objects may be chained.
|
||||||
var wrapper = function(obj) { this._wrapped = obj; };
|
var wrapper = function(obj) { this._wrapped = obj; };
|
||||||
|
|
||||||
|
// Expose `wrapper.prototype` as `_.prototype`
|
||||||
|
_.prototype = wrapper.prototype;
|
||||||
|
|
||||||
// Helper function to continue chaining intermediate results.
|
// Helper function to continue chaining intermediate results.
|
||||||
var result = function(obj, chain) {
|
var result = function(obj, chain) {
|
||||||
return chain ? _(obj).chain() : obj;
|
return chain ? _(obj).chain() : obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user