Commits

Anonymous committed 6dddc79

a couple more batteries functions

Comments (0)

Files changed (1)

                   return new heir();
               }),
 
-    'prototypal': function(object) {
-        if (!('constructor' in object)) {
-            object.constructor = function() {};
+    'prototypal': function(prototype) {
+        if (!('constructor' in prototype)) {
+            prototype.constructor = function() {};
         }
-        object.constructor.prototype = object;
-        return object.constructor;
+        prototype.constructor.prototype = prototype;
+        return prototype.constructor;
     },
 
     '$break': {},
             });
         }
         return o;
-    }
+    },
+
+	'copy': function(object) {
+		return batteries.omap(object, function(key, value) {
+			return value; 
+		});
+	}
 };
 
 // aliases