Skip to content

Commit 2124b5b

Browse files
authored
chore: simplify NullObject (#104)
1 parent b617c7c commit 2124b5b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ class Custom {
1111
}
1212
}
1313

14-
const NullObject = (() => {
15-
const C = function () {};
16-
C.prototype = Object.create(null);
17-
return C;
18-
})();
14+
function NullObject() {}
15+
NullObject.prototype = Object.create(null);
1916

2017
const node_version = +process.versions.node.split('.')[0];
2118

0 commit comments

Comments
 (0)