|
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:
430 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Checks if `value` is suitable for use as unique object key.
|
|---|
| 3 | *
|
|---|
| 4 | * @private
|
|---|
| 5 | * @param {*} value The value to check.
|
|---|
| 6 | * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|---|
| 7 | */
|
|---|
| 8 | function isKeyable(value) {
|
|---|
| 9 | var type = typeof value;
|
|---|
| 10 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|---|
| 11 | ? (value !== '__proto__')
|
|---|
| 12 | : (value === null);
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | module.exports = isKeyable;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.