Registry / serialization / apg-conv-api

apg-conv-api

JSON →
library1.0.1jsnpmunverified

apg-conv-api is a JavaScript library that provided an API for converting integer arrays to encoded byte streams (Node.js Buffers) and vice versa. It also exposed low-level transformation functions for encoding and decoding, and was bundled for use in both Node.js and browser environments. The package is officially deprecated as of version 1.0.1, with its functionality superseded by `apg-js`. Developers are strongly advised to migrate to `apg-js` for ongoing support and new features. The package's release cadence was tied to its companion `apg-conv` library, but is now effectively halted due to its deprecated status. Its key differentiator was providing direct programmatic access to the `apg-conv` core conversion logic for various data types.

npm install apg-conv-api
INSTALL
IMPORT
SIG · APG-CONV-API
A
apg-conv-api
serializationjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

apgConv
const apgConv = require('apg-conv-api');
import apgConv from 'apg-conv-api';
Primary import for Node.js CommonJS environments. This package does not support ESM imports.
apgConv.converter.decode
const { converter } = require('apg-conv-api'); const decoded = converter.decode("UTF8", chars);
import { converter } from 'apg-conv-api';
Accessing specific utility functions from the `converter` object after requiring the main module.
apgConv (global in browser)
<!-- In HTML --> <script src="./apg-conv-api.js"></script> <script> const buf = apgConv.converter.decode("UTF8", chars); </script>
In browser environments, including the script tag exposes `apgConv` as a global object.

Demonstrates how to use `apg-conv-api` to encode an array of integer code points into a Node.js Buffer and then decode it back using UTF8 encoding.

const apgConv = require('apg-conv-api'); // Example: Define some characters (e.g., Unicode code points) const chars = [0x41, 0x42, 0x43, 0xE2, 0x82, 0xAC]; // 'ABC€' in UTF-8 code points console.log('Original character array:', chars); // Encode to a Buffer (UTF8) const buffer = apgConv.converter.encode('UTF8', chars); console.log('Encoded Buffer:', buffer); console.log('Buffer as string:', buffer.toString('utf8')); // Decode back to an array of integers (UTF8) const decodedChars = apgConv.converter.decode('UTF8', buffer); console.log('Decoded character array:', decodedChars);
Debug
Known issues
deprecatedThe `apg-conv-api` package is officially deprecated. Users should migrate to `apg-js` for all current and future development.
fix
Replace `apg-conv-api` with `apg-js`. Refer to the `apg-js` documentation and `apg-js-examples` for updated usage patterns.
affects: >=1.0.0
gotchaThis package is designed for CommonJS (Node.js `require`) and global browser usage. It does not provide native ES Module (ESM) support.
fix
For Node.js, continue using `require()`. For modern applications requiring ESM, migrate to `apg-js` which offers ESM compatibility.
affects: >=1.0.0
breakingFuture compatibility with newer Node.js versions or browser environments is not guaranteed due to the package's deprecated status and lack of maintenance.
fix
Migrate to the actively maintained `apg-js` package to ensure ongoing compatibility and receive critical updates.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: apgConv.converter.decode is not a function
Attempting to use `apgConv` without properly requiring or including it, or using an incorrect symbol name.
fix
Ensure `const apgConv = require('apg-conv-api');` is at the top of your Node.js file, or that the script tag for `apg-conv-api.js` is included in your HTML before calling `apgConv` in a browser.
ERR_REQUIRE_ESM: require() of ES Module ... not supported
Trying to `require()` an ES Module or using `import` syntax with this CommonJS-only package.
fix
This package is CommonJS-only. If you are in an ES Module environment, you must either use a dynamic `import()` or, preferably, migrate to the `apg-js` package which offers ES Module support.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
apg-convrequiredThis package is the API layer for apg-conv, requiring it for the core conversion logic.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
apg-conv-api — npm install apg-conv-api · libregistry