Skip to content

Instantly share code, notes, and snippets.

@ljharb

ljharb/test.js

Created Feb 4, 2016
Embed
What would you like to do?
node 0.6-0.12 has a broken `Object.getOwnPropertyNames`
> Object.defineProperty(Object.prototype, 'a', { set: function (v) { throw new Error(v); } });
{}
> Object.getOwnPropertyNames({})
[]
> Object.getOwnPropertyNames({a: 1})
Error: true
at Object.defineProperty.set (repl:1:74)
at Function.getOwnPropertyNames (native)
at repl:1:9
at REPLServer.self.eval (repl.js:110:21)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:203:10)
at Interface._line (readline.js:532:8)
at Interface._ttyWrite (readline.js:761:14)
at ReadStream.onkeypress (readline.js:100:10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment