shim.js 158 Bytes edit raw blame history 1 2 3 4 5 6 7 'use strict'; module.exports = function (value) { value = Number(value); if (isNaN(value) || (value === 0)) return value; return (value > 0) ? 1 : -1; };