|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
403 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var isObject = require('es-object-atoms/isObject');
|
|---|
| 4 |
|
|---|
| 5 | var KeyForSymbol = require('./KeyForSymbol');
|
|---|
| 6 |
|
|---|
| 7 | // https://262.ecma-international.org/14.0/#sec-canbeheldweakly
|
|---|
| 8 |
|
|---|
| 9 | module.exports = function CanBeHeldWeakly(v) {
|
|---|
| 10 | if (isObject(v)) {
|
|---|
| 11 | return true; // step 1
|
|---|
| 12 | }
|
|---|
| 13 | if (typeof v === 'symbol' && typeof KeyForSymbol(v) === 'undefined') {
|
|---|
| 14 | return true; // step 2
|
|---|
| 15 | }
|
|---|
| 16 | return false; // step 3
|
|---|
| 17 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.