Installation
Installing Splendid Utils
You can install Splendid Utils through npm.
npm install @splendidlabz/utils
Three kinds of utils
We separated the library into three kinds of utilities:
lib
utilities are usable in both client and server environments.dom
utilities are only usable in client environments.node
utilities are only usable in server environments.
We do this to minimize the size of the dependencies you need to download for DOM environments — hence increasing performance.
You can import all utilities with the following code:
// For lib utilitiesimport * as utils from '@splendidlabz/utils'
// For dom utilitiesimport * as domUtils from '@splendidlabz/utils/dom'
// For node utilitiesimport * as nodeUtils from '@splendidlabz/utils/node'