pvutils
Common utilities for products from Peculiar Ventures
Last updated a month ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install pvutils 
SYNC missed versions from official npm registry.

pvutils

NPM License GitHub Actions Workflow Status npm version Coveralls npm downloads

pvutils is a set of common utility functions used in various Peculiar Ventures Javascript based projects.

Some example capabilities included in pvutils include:

  • Converting dates into UTC,
  • Converting an "ArrayBuffer" into a hexdecimal string,
  • Converting a number from 2^base to 2^10,
  • Converting a number from 2^10 to 2^base,
  • Concatenate two ArrayBuffers,
  • And more...

Install

npm install pvutils

Breaking Changes In v2

v2 ships ESM only. The CommonJS build is removed: v1 published build/utils.js (CommonJS) and build/utils.es.js (ESM); v2 publishes a single ES module, build/index.js, with build/index.d.ts, behind an exports map.

  • Node.js ^20.19.0 || >=22.12.0 is required (previously >=16). These versions support require() of ES modules, so CommonJS code can keep using require("pvutils") without changes. Node.js 22.0–22.11 is not supported: it can't require() ESM.
  • TypeScript projects that compile to CommonJS need "module": "node20" or "nodenext" (TypeScript 5.9+). With "module": "node16" the compiler reports TS1479.
  • ESM and bundler setups ("module": "preserve", "moduleResolution": "bundler") work without changes.
  • Legacy "moduleResolution": "node" (node10) resolves the package through types; pvutils has no subpath exports, so nothing else changes.
  • Jest in CommonJS mode can't load ESM packages. Use Jest's ESM mode, add pvutils to the transformIgnorePatterns exceptions, or switch to Vitest.
  • Deep imports are blocked. The exports map allows only pvutils and pvutils/package.json. Imports of pvutils/build/utils.js or pvutils/build/utils.es.js must change to pvutils.

The public API is unchanged; only packaging and runtime requirements changed.

Contributing

See CONTRIBUTING.md for development setup, commit conventions and the release flow.

Current Tags

  • 2.0.0                                ...           latest (a month ago)

24 Versions

  • 2.0.0                                ...           a month ago
  • 1.2.0                                ...           4 months ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.17                                ...           8 years ago
  • 1.0.16                                ...           8 years ago
  • 1.0.15                                ...           8 years ago
  • 1.0.14                                ...           9 years ago
  • 1.0.13                                ...           9 years ago
  • 1.0.12                                ...           9 years ago
  • 1.0.11                                ...           9 years ago
  • 1.0.10                                ...           9 years ago
  • 1.0.9                                ...           9 years ago
  • 1.0.8                                ...           9 years ago
  • 1.0.7                                ...           10 years ago
  • 1.0.6                                ...           10 years ago
  • 1.0.5                                ...           10 years ago
  • 1.0.4                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
Downloads
Total 86
Today 0
This Week 4
This Month 57
Last Day 0
Last Week 24
Last Month 11
Dependencies (0)
None
Dev Dependencies (7)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE