Closed caub closed 4 years ago
StackFrame constructor doesn't accept object with null prototype:
> const StackFrame = require('stackframe'); undefined > new StackFrame({fileName:'lol'}) { fileName: 'lol' } > new StackFrame(Object.assign(Object.create(null),{fileName:'lol'})) {} > new StackFrame('lol'.match(/(?<fileName>\w+)/).groups) {}
$ npm ls stackframe ├── stackframe@1.0.4 └─┬ stacktrace-gps@3.0.2 └── stackframe@1.0.4 deduped
issue is obj instanceof Object, which is... a weird way to test for objects, to say the least. it also uses obj.hasOwnProperty lower down which will cause issues when the first part is fixed.
obj instanceof Object
obj.hasOwnProperty
StackFrame constructor doesn't accept object with null prototype: