polyfills.Symbol.hasInstance.meta.json Maven / Gradle / Ivy
The newest version!
{"aliases":["es6"],"browsers":{"ie":"< 13","ie_mob":"*","safari":"<9","chrome":"< 50","firefox":"< 40","ios_saf":"*","opera":"< 37","samsung_mob":"<5","android":"*","bb":"10 - *"},"dependencies":["Object.defineProperty","Symbol"],"license":"MIT","spec":"http://www.ecma-international.org/ecma-262/6.0/index.html#sec-symbol.hasinstance","docs":"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Symbol","detectSource":"'Symbol' in this && 'hasInstance' in this.Symbol","testSource":"","baseDir":"Symbol/hasInstance","hasTests":true,"testsSource":"/* eslint-env mocha, browser*/\n/* global proclaim, it */\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { // this is IE 8.\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nit('has the well known symbol hasInstance as static properties on Symbol', function() {\n\tproclaim.notEqual(Symbol.hasInstance, undefined);\n\n\tif (supportsDescriptors) {\n\t\tvar hasInstance = Symbol.hasInstance;\n\t\tSymbol.hasInstance = \"nope\";\n\t\tproclaim.equal(Symbol.hasInstance, hasInstance);\n\t}\n});"}