Using `Object.keys` instead

`Object.keys` seems more appropriate in this case than
`Object.getOwnPropertyNames`