valid-value.js 331 B

123456789101112131415
  1. "use strict";
  2. var numIsNaN = require("../../number/is-nan");
  3. module.exports = function (t, a) {
  4. var x;
  5. a(t(0), 0, "0");
  6. a(t(false), false, "false");
  7. a(t(""), "", "''");
  8. a(numIsNaN(t(NaN)), true, "NaN");
  9. a(t((x = {})), x, "{}");
  10. a.throws(function () { t(); }, "Undefined");
  11. a.throws(function () { t(null); }, "null");
  12. };