Plato on Github
Report Home
node_modules/es5-ext/object/get-property-names.js
Maintainability
69.47
Lines of code
18
Difficulty
7.37
Estimated Errors
0.11
Function weight
By Complexity
By SLOC
'use strict'; var uniq = require('../array/#/uniq') , value = require('./valid-value') , push = Array.prototype.push , getOwnPropertyNames = Object.getOwnPropertyNames , getPrototypeOf = Object.getPrototypeOf; module.exports = function (obj) { var keys; obj = Object(value(obj)); keys = getOwnPropertyNames(obj); while ((obj = getPrototypeOf(obj))) { push.apply(keys, getOwnPropertyNames(obj)); } return uniq.call(keys); };