v-utils-test
v1.0.0
Published
A TypeScript utility library providing common helper functions
Maintainers
Readme
v-utils-test
A TypeScript utility library providing common helper functions.
Installation
npm install v-utils-test
# or
yarn add v-utils-testFeatures
- Arrays: Helper functions for array manipulation and comparison
- Assertions: Functions for runtime type assertions
- Type Checks: Utility functions for checking types
- Async: Sleep function for async operations
Usage
import {
arrayContentEquals,
assert,
isDefined,
sleep
} from 'v-utils-test';
// Array utilities
const arr1 = [1, 2, 3];
const arr2 = [1, 2, 3];
const areEqual = arrayContentEquals(arr1, arr2); // true
// Assertions
assert(value !== undefined, "Value must be defined");
// Type checks
if (isDefined(value)) {
// value is defined
}
// Async utilities
async function example() {
console.log("Start");
await sleep(1000); // wait for 1 second
console.log("End");
}License
ISC
