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.

safe-to-string.js 373B

123456789101112
  1. "use strict";
  2. module.exports = function (t, a) {
  3. a(t(), "undefined");
  4. a(t(null), "null");
  5. a(t(10), "10");
  6. a(t("str"), "str");
  7. a(t({ toString: function () { return "miszka"; } }), "miszka");
  8. // eslint-disable-next-line symbol-description
  9. if (typeof Symbol === "function") a(t(Symbol()), "Symbol()");
  10. a(t(Object.create(null)), "<Non-coercible to string value>");
  11. };