1.0.0 • Published 9 years ago

phantom-ownpropertynames v1.0.0

Weekly downloads
12
License
MIT
Repository
github
Last release
9 years ago

phantom-ownpropertynames Build Status

Fix Object.getOwnPropertyNames behavior for functions in PhantomJS 1.9

Install

$ npm install --save phantom-ownpropertynames

Usage

Detect whether Object.getOwnPropertyNames is broken and shim if it is:

require('phantom-ownpropertynames/implement')

Or just get the patched function directly:

var getOwnPropertyNames = require('phantom-ownpropertynames')
getOwnPropertyNames({foo: 'bar'})
// => ['foo']

API

getOwnPropertyNames(obj) -> array

obj

Required
Type: object

License

MIT © Ben Drucker