From 644c5aa2ce6af135379bc896c07e1b3a33205eb2 Mon Sep 17 00:00:00 2001 From: Ryan W Tenney Date: Tue, 5 Oct 2010 20:32:57 -0400 Subject: [PATCH] Expose `wrapper.prototype` as `_.prototype` --- underscore.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/underscore.js b/underscore.js index bb4ea3bfd..f28f46ff1 100644 --- a/underscore.js +++ b/underscore.js @@ -670,6 +670,9 @@ // underscore functions. Wrapped objects may be chained. var wrapper = function(obj) { this._wrapped = obj; }; + // Expose `wrapper.prototype` as `_.prototype` + _.prototype = wrapper.prototype; + // Helper function to continue chaining intermediate results. var result = function(obj, chain) { return chain ? _(obj).chain() : obj;