1.0.1 • Published 4 years ago
@cactus-tech/utils v1.0.1
@cactus-tech/utils :cactus:
Common helpful utilities for creating JS application
Installation
npm install --save @cactus-tech/utils
Usage
Import the main utils in the file as follows:
import { encodeURI } from '@cactus-tech/utils';
Functions
The package includes following functions:
- encodeURIQuery - Loops through the query parameters and encodes it with encodeURI function.
- Usage:
const output = encodeURIQuery({"somekey": "somevalue"})
- Usage:
- base64encodeURIComponent - Encodes the URI with base64 strategy.
- Usage:
const output = base64encodeURIComponent("mystring")
- Usage:
- random - Generates random number with specified length.
- Usage:
const output = random(10)
- Usage: