Installation

Installing Splendid Utils

You can install Splendid Utils through npm.

Terminal window
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 utilities
import * as utils from '@splendidlabz/utils'
// For dom utilities
import * as domUtils from '@splendidlabz/utils/dom'
// For node utilities
import * as nodeUtils from '@splendidlabz/utils/node'