phantom-ownpropertynames [](https://travis-ci.org/bendrucker/phantom-ownpropertynames)
June 19, 2015 · View on GitHub
Fix
Object.getOwnPropertyNamesbehavior 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