Add node modules and new code for release (#57)

Co-authored-by: taakleton <taakleton@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-01-26 17:16:26 -05:00
committed by GitHub
parent da63a48ad7
commit a517f2ff65
8435 changed files with 1764387 additions and 7 deletions

42
node_modules/underscore/cjs/_collectNonEnumProps.js generated vendored Normal file
View File

@ -0,0 +1,42 @@
var _setup = require('./_setup.js');
var isFunction = require('./isFunction.js');
var _has = require('./_has.js');
// Internal helper to create a simple lookup structure.
// `collectNonEnumProps` used to depend on `_.contains`, but this led to
// circular imports. `emulatedSet` is a one-off solution that only works for
// arrays of strings.
function emulatedSet(keys) {
var hash = {};
for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
return {
contains: function(key) { return hash[key] === true; },
push: function(key) {
hash[key] = true;
return keys.push(key);
}
};
}
// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
// needed.
function collectNonEnumProps(obj, keys) {
keys = emulatedSet(keys);
var nonEnumIdx = _setup.nonEnumerableProps.length;
var constructor = obj.constructor;
var proto = isFunction(constructor) && constructor.prototype || _setup.ObjProto;
// Constructor is a special case.
var prop = 'constructor';
if (_has(obj, prop) && !keys.contains(prop)) keys.push(prop);
while (nonEnumIdx--) {
prop = _setup.nonEnumerableProps[nonEnumIdx];
if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
keys.push(prop);
}
}
}
module.exports = collectNonEnumProps;