Typescript library with all those utils I often use in my projects.
It includes Math, Dom, Canvas, UI, Animations, Colors, Image, and generic javascript utils. Each one with its own module and documentation.
npm i --save js-math-and-ui-utils
You can import the whole library, just one module, as well as each method one by one. This allows you to keep your javascript bundle as small as possible.
import { * as Utils } from 'js-math-and-ui-utils'
Utils.roundNumber(myNumberVar, requiredDecimals)
import { * as MathUtils } from 'js-math-and-ui-utils/mathUtils'
MathUtils.roundNumber(myNumberVar, requiredDecimals)
import roundNumber from 'js-math-and-ui-utils/mathUtils/roundNumber'
roundNumber(myNumberVar, requiredDecimals)
Check the docs for each module:
Alessandro Cipolletti
This project is licensed under the MIT License - see the LICENSE file for details