Vandium Utils is a JavaScript utility library providing a collection of common, reusable functions primarily intended for use within Vandium-io projects, though suitable for general Node.js applications. Currently at stable version 2.0.0, the library offers functionalities such as deep object cloning, date-to-ISO string conversion, various type-checking predicates (e.g., `isArray`, `isFunction`, `isObject`, `isPromise`), null/undefined checks, object emptiness determination, boolean parsing from diverse inputs, and a robust string templating engine. The library maintains a steady release cadence driven by the needs of the Vandium ecosystem. Its key differentiators include a focused set of utilities designed for serverless environments (given its association with AWS Lambda keywords), lightweight footprint, and built-in TypeScript definitions, promoting type-safe development. It supports Node.js versions 10.16 and above.
npm install vandium-utilsVerified import paths — ran on the pinned version, not inferred.
Demonstrates `templateString` for string interpolation, `isObjectEmpty` for object validation, and `clone` for deep object copying.
Review the official changelog or GitHub releases for `vandium-utils` for detailed migration guides between major versions.
Be aware of `clone`'s behavior for non-object/non-array inputs. If a new instance is required for primitives, explicitly reassign them (e.g., `const newVar = oldVar;`).
Ensure inputs to `parseBoolean` are among the explicitly supported string values or actual boolean literals. For other values, perform explicit type conversions or checks before passing to `parseBoolean` if specific boolean outcomes are critical.
Ensure your module context matches your import statement. For ESM, use `import { templateString } from 'vandium-utils';`. If in CJS, verify the export name and ensure the path is correct.Convert `require` statements to `import` statements: `const { funcName } = require('pkg');` becomes `import { funcName } from 'pkg';`. Ensure your `package.json` has `"type": "module"` if you intend to use ESM, or use a `.mjs` file extension.No dependency data recorded yet.