|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
722 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var uncurryThis = require('../internals/function-uncurry-this');
|
|---|
| 3 | var hasOwn = require('../internals/has-own-property');
|
|---|
| 4 | var toIndexedObject = require('../internals/to-indexed-object');
|
|---|
| 5 | var indexOf = require('../internals/array-includes').indexOf;
|
|---|
| 6 | var hiddenKeys = require('../internals/hidden-keys');
|
|---|
| 7 |
|
|---|
| 8 | var push = uncurryThis([].push);
|
|---|
| 9 |
|
|---|
| 10 | module.exports = function (object, names) {
|
|---|
| 11 | var O = toIndexedObject(object);
|
|---|
| 12 | var i = 0;
|
|---|
| 13 | var result = [];
|
|---|
| 14 | var key;
|
|---|
| 15 | for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
|
|---|
| 16 | // Don't enum bug & hidden keys
|
|---|
| 17 | while (names.length > i) if (hasOwn(O, key = names[i++])) {
|
|---|
| 18 | ~indexOf(result, key) || push(result, key);
|
|---|
| 19 | }
|
|---|
| 20 | return result;
|
|---|
| 21 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.