Afanasev_Stepan_PIbd-21_IP/ИП 3 лаба/node_modules/has-symbols/index.js
[USERNAME] 0dd26716dc Lab2-5
2024-01-10 16:11:49 +04:00

14 lines
420 B
JavaScript

'use strict';
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
var hasSymbolSham = require('./shams');
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();
};