UNPKG

typed-array-ranges

Version:

Get the Smallest and Largest Possible Numbers for a Typed Array

10 lines (7 loc) 281 B
const getMax = require("./get-max"); const getMin = require("./get-min"); const getRange = array => { if (typeof array !== "string" && array.constructor) array = array.constructor.name; return [getMin(array), getMax(array)]; }; module.exports = { getMax, getMin, getRange };