UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

17 lines (13 loc) 376 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/numberCreateOperationPrecision.ts function createOperationPrecision(operation) { return (...nums) => { const [first, ...others] = nums; return others.reduce((prev, next) => operation(prev, next), first); }; } export { createOperationPrecision };