UNPKG

data-provider-temporary

Version:

Library that helps with server-to-client synchronization of data

12 lines (9 loc) 238 B
"use strict"; var exp = Math.exp; module.exports = function (value) { if (isNaN(value)) return NaN; value = Number(value); if (value === 0) return 1; if (!isFinite(value)) return Infinity; return (exp(value) + exp(-value)) / 2; };