Skip to content

emocreation/js-utils

Repository files navigation

@emohk/utils

The package contains a collection of utility functions that can be used in various projects.

Installation

npm install @emohk/utils

Usage

ESM

import { checkStringPresent, checkObject, hasValues, chunk } from '@emohk/utils'

CommonJS

const { checkStringPresent, checkObject, hasValues, chunk } = require('@emohk/utils')

Example

checkStringPresent('hello world') // true
checkObject({}) // true
hasValues([1, 2, 3]) // true
chunk([1, 2, 3, 4, 5, 6], 2) // [[1, 2], [3, 4], [5, 6]]

Go to the API documentation for more information.

Development

To install dependencies:

bun install

To build:

bun run build

To generate typescript declarations:

bun run declare

To generate documentation:

bun run docs

This project was created using bun init in bun v1.3.6. Bun is a fast all-in-one JavaScript runtime.

About

A collection of utility functions for various projects.

Resources

License

Stars

Watchers

Forks

Contributors