es6-symbol
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -7,5 +7,3 @@ 'use strict'; | ||
symbol = Symbol('test symbol'); | ||
try { | ||
if (String(symbol) !== 'Symbol (test symbol)') return false; | ||
} catch (e) { return false; } | ||
try { String(symbol); } catch (e) { return false; } | ||
if (typeof Symbol.iterator === 'symbol') return true; | ||
@@ -12,0 +10,0 @@ |
{ | ||
"name": "es6-symbol", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "ECMAScript6 Symbol polyfill", | ||
@@ -20,3 +20,3 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"d": "~0.1.1", | ||
"es5-ext": "~0.10.2" | ||
"es5-ext": "~0.10.4" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -7,3 +7,3 @@ # es6-symbol | ||
- Underneath it uses real string property names which can easily be retrieved (however accidental collision with other property names is unlikely) | ||
- As it needs custom `toString` behavior to work properly. Original `Symbol.prototoype.toString` couldn't be implemented as specified, still it's accessible as `Symbol.prototoype.properToString` | ||
- As it needs custom `toString` behavior to work properly. Original `Symbol.prototype.toString` couldn't be implemented as specified, still it's accessible as `Symbol.prototoype.properToString` | ||
@@ -10,0 +10,0 @@ ### Usage |
'use strict'; | ||
module.exports = function (t, a) { a(typeof t(), 'boolean'); }; | ||
var global = require('es5-ext/global') | ||
, polyfill = require('../polyfill'); | ||
module.exports = function (t, a) { | ||
var cache; | ||
a(typeof t(), 'boolean'); | ||
cache = global.Symbol; | ||
global.Symbol = polyfill; | ||
a(t(), true); | ||
if (cache === undefined) delete global.Symbol; | ||
else global.Symbol = cache; | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9978
173
Updatedes5-ext@~0.10.4