UNPKG

ramda-adjunct

Version:

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

9 lines 261 B
import isFinite from '../../isFinite.js'; var truncPonyfill = function truncPonyfill(v) { var numV = Number(v); if (!isFinite(numV)) { return numV; } return numV - numV % 1 || (numV < 0 ? -0 : numV === 0 ? numV : 0); }; export default truncPonyfill;