is-symbol.js 407 B

12345678910111213141516
  1. "use strict";
  2. var SymbolPolyfill = require("../polyfill");
  3. module.exports = function (t, a) {
  4. a(t(undefined), false, "Undefined");
  5. a(t(null), false, "Null");
  6. a(t(true), false, "Primitive");
  7. a(t("raz"), false, "String");
  8. a(t({}), false, "Object");
  9. a(t([]), false, "Array");
  10. if (typeof Symbol !== "undefined") {
  11. a(t(Symbol("foo")), true, "Native");
  12. }
  13. a(t(SymbolPolyfill()), true, "Polyfill");
  14. };