"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/es5-ext/object/get-property-names.js" (8 Mar 2017, 444 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 'use strict';
    2 
    3 var uniq  = require('../array/#/uniq')
    4   , value = require('./valid-value')
    5 
    6   , push = Array.prototype.push
    7   , getOwnPropertyNames = Object.getOwnPropertyNames
    8   , getPrototypeOf = Object.getPrototypeOf;
    9 
   10 module.exports = function (obj) {
   11     var keys;
   12     obj = Object(value(obj));
   13     keys = getOwnPropertyNames(obj);
   14     while ((obj = getPrototypeOf(obj))) {
   15         push.apply(keys, getOwnPropertyNames(obj));
   16     }
   17     return uniq.call(keys);
   18 };