You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

is-symbol.js 280B

123456789
  1. "use strict";
  2. module.exports = function (value) {
  3. if (!value) return false;
  4. if (typeof value === "symbol") return true;
  5. if (!value.constructor) return false;
  6. if (value.constructor.name !== "Symbol") return false;
  7. return value[value.constructor.toStringTag] === "Symbol";
  8. };