mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-09 04:20:08 +08:00
15 lines
447 B
JavaScript
15 lines
447 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
||
|
|
var hasSymbolSham = require('./shams');
|
||
|
|
|
||
|
|
/** @type {import('.')} */
|
||
|
|
module.exports = function hasNativeSymbols() {
|
||
|
|
if (typeof origSymbol !== 'function') { return false; }
|
||
|
|
if (typeof Symbol !== 'function') { return false; }
|
||
|
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
||
|
|
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
||
|
|
|
||
|
|
return hasSymbolSham();
|
||
|
|
};
|