Permalink
Browse files

Remove Object.prototype.mixin and Function.prototype.curry

They are not used that much and I really want to keep
proto minimal.
  • Loading branch information...
1 parent 02a2f46 commit 48fb1389bbd32c87b08c5023b30b22c5db8b3753 @creationix committed Aug 13, 2010
Showing with 0 additions and 28 deletions.
  1. +0 −28 lib/proto.js
View
@@ -21,8 +21,6 @@ SOFTWARE.
*/
var proto = Object.prototype;
-var func_proto = Function.prototype;
-var arr_proto = Array.prototype;
// Implements a forEach much like the one for Array.prototype.forEach, but for
// any object.
@@ -51,29 +49,3 @@ if (typeof proto.map !== 'function') {
return accum;
}});
}
-
-// Implements a shallow copy onto the current object.
-if (typeof proto.mixin !== 'function') {
- Object.defineProperty(proto, "mixin", {value: function (obj) {
- var keys = Object.keys(obj);
- var length = keys.length;
- for (var i = 0; i < length; i++) {
- var key = keys[i];
- this[key] = obj[key];
- }
- return this;
- }});
-}
-
-// Implements a function curry function. This allows you to call part of a
-// function later.
-if (typeof func_proto.curry !== 'function') {
- Object.defineProperty(func_proto, "curry", {value: function () {
- var fn = this;
- var first = arr_proto.slice.call(arguments);
- return function () {
- return fn.apply(this, first.concat(arr_proto.slice.call(arguments)));
- };
- }});
-}
-

0 comments on commit 48fb138

Please sign in to comment.