MCPcopy Create free account
hub / github.com/TruthHun/BookStack / collectNonEnumProps

Function collectNonEnumProps

static/word2md/mammoth.browser.js:28765–28780  ·  view source on GitHub ↗
(obj, keys)

Source from the content-addressed store, hash-verified

28763 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
28764
28765 function collectNonEnumProps(obj, keys) {
28766 var nonEnumIdx = nonEnumerableProps.length;
28767 var constructor = obj.constructor;
28768 var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
28769
28770 // Constructor is a special case.
28771 var prop = 'constructor';
28772 if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
28773
28774 while (nonEnumIdx--) {
28775 prop = nonEnumerableProps[nonEnumIdx];
28776 if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
28777 keys.push(prop);
28778 }
28779 }
28780 }
28781
28782 // Retrieve the names of an object's own properties.
28783 // Delegates to **ECMAScript 5**'s native `Object.keys`

Callers 1

mammoth.browser.jsFile · 0.70

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected