index.js 394 B

12345678910111213
  1. 'use strict';
  2. var origSymbol = global.Symbol;
  3. var hasSymbolSham = require('./shams');
  4. module.exports = function hasNativeSymbols() {
  5. if (typeof origSymbol !== 'function') { return false; }
  6. if (typeof Symbol !== 'function') { return false; }
  7. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  8. if (typeof Symbol('bar') !== 'symbol') { return false; }
  9. return hasSymbolSham();
  10. };