0
0

shim.js 158 B

1234567
  1. 'use strict';
  2. module.exports = function (value) {
  3. value = Number(value);
  4. if (isNaN(value) || (value === 0)) return value;
  5. return (value > 0) ? 1 : -1;
  6. };