Skip to main content

Utilities Overview

JavaScript utilities for type checking, arrays, comparison, common functions, iterables, objects, promises, randomization, etc. The code is universal and works in Node/browser/microwave.

Usage#

Undercut Demo

import { isNumberValue } from "@undercut/utils";
console.log(isNumberValue(123)); // trueconsole.log(isNumberValue("hello")); // falseconsole.log(isNumberValue(NaN)); // false

Prerequisites#

The package is compliant with the Raw Module Specification 0.3.0 and provides original modern JavaScript code in the ESM format.

You may need to compile the code and/or load polyfills depending on your environment. Look for exact minimum versions of @babel/preset-env and core-js in the package.json.

Most modern apps already have such infrastructure or use similar tools. So most likely you don't have to do anything. If not, just add Babel to your build step.

Installation#

npm install @undercut/utils# oryarn add @undercut/utils

Updating#

As descibed in RMS: in case of upgrading the package to a newer version, please do so for @babel/preset-env and core-js too.