Skip to content

Commit 6d4e644

Browse files
author
Aadit M Shah
committed
Made augment non-enumerable - fixes aaditmshah#4
1 parent dbc9190 commit 6d4e644

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "augment",
33
"repo": "javascript/augment",
44
"description": "The world's smallest and fastest classical JavaScript inheritance pattern.",
5-
"version": "3.3.1",
5+
"version": "3.3.2",
66
"keywords": ["augment", "augments", "augmentation", "extend", "extends", "extension", "prototype", "prototypal", "class", "classical", "object", "inheritance", "uber", "super", "constructor", "oop"],
77
"main": "lib/augment.js",
88
"scripts": ["lib/augment.js"],

lib/augment.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ var augment = (function (bind, call) {
77
var arrayFrom = Array.from = callable(Array.prototype.slice);
88
var ownPropertyOf = Object.ownPropertyOf = callable(Object.hasOwnProperty);
99

10-
Function.prototype.augment = Object.prototype.augment = augment;
10+
var defineProperty = Object.defineProperty;
11+
var augmentDescriptor = { value: augment };
12+
13+
defineProperty(Function.prototype, "augment", augmentDescriptor);
14+
defineProperty(Object.prototype, "augment", augmentDescriptor);
1115

1216
return callable(augment);
1317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "augment",
33
"description": "The world's smallest and fastest classical JavaScript inheritance pattern.",
4-
"version": "3.3.1",
4+
"version": "3.3.2",
55
"keywords": ["augment", "augments", "augmentation", "extend", "extends", "extension", "prototype", "prototypal", "class", "classical", "object", "inheritance", "uber", "super", "constructor", "oop"],
66
"author": "Aadit M Shah (http://aaditmshah.github.com/) <[email protected]>",
77
"main": "lib/augment.js",

0 commit comments

Comments
 (0)