add optional typeof symbol transformer

This commit is contained in:
Sebastian McKenzie
2015-01-05 00:06:57 +11:00
parent 103b619364
commit 9bfb8c440a
6 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
var s = Symbol("s");
assert.equal(typeof s, "symbol");

View File

@@ -0,0 +1,2 @@
var s = Symbol("s");
assert.equal(typeof s, "symbol");

View File

@@ -0,0 +1,8 @@
"use strict";
var _typeof = function (obj) {
return obj && obj.constructor === Symbol ? "symbol" : typeof obj;
};
var s = Symbol("s");
assert.equal(_typeof(s), "symbol");