pvtsutils is a utility library designed for TypeScript-based projects, offering a suite of common helper functions for data manipulation. Key functionalities include robust ArrayBuffer conversions, enabling seamless transformation between various string encodings such as hexadecimal, UTF-8, binary, Base64, and Base64Url. Additionally, it provides utilities for combining multiple ArrayBuffer instances, performing deep equality checks on buffers, and handling object property assignment akin to Object.assign. The library is currently stable at version 1.3.6, with consistent maintenance reflected in recent minor updates to its Convert class functionality. While it is built with TypeScript, its module system primarily supports CommonJS and UMD patterns, making it compatible with Node.js environments via require() and browser environments through script tags or AMD loaders. This design choice differentiates it from many modern ESM-first libraries, offering broad compatibility for existing codebases. Its focused approach on ArrayBuffer operations makes it particularly useful in cryptographic contexts, data processing pipelines, and other scenarios requiring low-level binary data handling.
npm install pvtsutilsVerified import paths — ran on the pinned version, not inferred.
Demonstrates `Convert` for encoding/decoding, `assign` for object merging, `combine` for buffer concatenation, and `isEqual` for buffer comparison.
Use a namespace import: `import * as pvtsutils from 'pvtsutils';` in ESM/TypeScript, or `const pvtsutils = require('pvtsutils');` in CommonJS. Then access members as `pvtsutils.Convert`, `pvtsutils.assign`, etc.Always specify the correct encoding string (e.g., 'hex', 'utf8', 'binary', 'base64', 'base64url') based on the input data format. UTF-8 is the default if no encoding is provided.
Correct the import statement to `import * as pvtsutils from 'pvtsutils';` and then access `pvtsutils.Convert.FromString(...)`.
For CommonJS environments, ensure you use `const pvtsutils = require('pvtsutils');`. If using ESM, use `import * as pvtsutils from 'pvtsutils';` and ensure your `tsconfig.json` and build setup are correctly configured for CJS interoperability.No dependency data recorded yet.