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.
#
Usageimport { isNumberValue } from "@undercut/utils";
console.log(isNumberValue(123)); // trueconsole.log(isNumberValue("hello")); // falseconsole.log(isNumberValue(NaN)); // false
#
PrerequisitesThe 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.
#
Installationnpm install @undercut/utils# oryarn add @undercut/utils
#
UpdatingAs descibed in RMS: in case of upgrading the package to a newer version, please do so for @babel/preset-env
and core-js
too.