to-pos-integer.js 248 B

12345678910
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. a(t({}), 0, "NaN");
  4. a(t(20), 20, "Positive integer");
  5. a(t(-20), 0, "Negative integer");
  6. a(t(Infinity), Infinity, "Infinity");
  7. a(t(15.343), 15, "Float");
  8. a(t(-15.343), 0, "Negative float");
  9. };