|
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:
563 bytes
|
| Line | |
|---|
| 1 | define(['./isObject', './_setup', './_has', './_collectNonEnumProps'], function (isObject, _setup, _has, _collectNonEnumProps) {
|
|---|
| 2 |
|
|---|
| 3 | // Retrieve the names of an object's own properties.
|
|---|
| 4 | // Delegates to **ECMAScript 5**'s native `Object.keys`.
|
|---|
| 5 | function keys(obj) {
|
|---|
| 6 | if (!isObject(obj)) return [];
|
|---|
| 7 | if (_setup.nativeKeys) return _setup.nativeKeys(obj);
|
|---|
| 8 | var keys = [];
|
|---|
| 9 | for (var key in obj) if (_has(obj, key)) keys.push(key);
|
|---|
| 10 | // Ahem, IE < 9.
|
|---|
| 11 | if (_setup.hasEnumBug) _collectNonEnumProps(obj, keys);
|
|---|
| 12 | return keys;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | return keys;
|
|---|
| 16 |
|
|---|
| 17 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.