Registry / serialization / uuid-parse

uuid-parse

JSON →
library1.1.0jsnpmunverified

uuid-parse is a JavaScript utility for converting RFC4122 UUID strings to Node.js Buffer objects (or Array/Buffer targets) and vice-versa. It provides `parse` and `unparse` functions for this specific transformation. The current stable version is 1.1.0, and the package is explicitly marked as no longer maintained. Its primary differentiator was providing parsing/unparsing functionality that was removed from a prior version of the `node-uuid` library, which is now maintained as `uuid`. Developers should be aware that this module will not receive updates for bugs, security vulnerabilities, or new features, and alternatives like the `uuid` package's `parse` and `stringify` functions are generally recommended for active projects. It does not have a release cadence due to its abandoned status.

npm install uuid-parse
INSTALL
IMPORT
SIG · UUID-PARSE
U
uuid-parse
serializationjavascriptv1.1.0
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.

uuidParse
const uuidParse = require('uuid-parse');
import uuidParse from 'uuid-parse';
This package is CommonJS-only and explicitly unmaintained. For modern ESM projects, consider the `uuid` package's `parse` and `stringify` functions instead.
parse
const { parse } = require('uuid-parse');
import { parse } from 'uuid-parse';
The `parse` function is a named export available via CommonJS destructuring. Direct ESM named imports are not supported.
unparse
const { unparse } = require('uuid-parse');
import { unparse } from 'uuid-parse';
The `unparse` function is a named export available via CommonJS destructuring. Direct ESM named imports are not supported.

Demonstrates parsing a UUID string into a Buffer and unparsing a Buffer back into a string, including usage with offsets and target buffers.

const uuidParse = require('uuid-parse'); const uuidString = '797ff043-11eb-11e1-80d6-510998755d10'; // Parse a UUID string into a Buffer const bytes = uuidParse.parse(uuidString); console.log('Parsed bytes:', bytes.toString('hex')); // Example with a target buffer and offset const targetBuffer = Buffer.alloc(32); const offset = 8; uuidParse.parse(uuidString, targetBuffer, offset); console.log('Parsed into target buffer:', targetBuffer.toString('hex')); // Unparse a Buffer into a UUID string const string = uuidParse.unparse(bytes); console.log('Unparsed string:', string); // Unparsing from a specific offset in a buffer const unparsedFromOffset = uuidParse.unparse(targetBuffer, offset); console.log('Unparsed from offset:', unparsedFromOffset);
Debug
Known issues
breakingThis module is no longer maintained. It will not receive updates for security vulnerabilities, bug fixes, or new features. Projects should migrate to actively maintained alternatives like the `uuid` package for robustness and security.
fix
Replace `uuid-parse` with `@lukeed/uuid` (lightweight) or `uuid` (feature-rich). Example: `uuid.parse()` and `uuid.stringify()` for `uuid` package.
affects: >=1.0.0
gotchaThe package is CommonJS-only (`require`). It does not natively support ES Modules (`import`). Attempting to use `import` syntax will result in errors in pure ESM environments.
fix
Ensure your project uses CommonJS if you must use this package, or transpile your code. The recommended fix is to migrate to an ESM-compatible UUID library.
affects: >=1.0.0
gotchaDue to its age and abandonment, `uuid-parse` might exhibit unexpected behavior or compatibility issues with newer Node.js Buffer APIs or browser environments if not properly polyfilled or bundled. The `Buffer` object is a Node.js primitive.
fix
Test thoroughly in your target environment. For browser usage, ensure a `Buffer` polyfill is in place. For Node.js, consider migrating to avoid potential future incompatibilities.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: uuidParse is not a function
Attempting to call `uuidParse()` directly after `require('uuid-parse')` when it's an object with `parse` and `unparse` methods.
fix
Access the methods as `uuidParse.parse(...)` or `uuidParse.unparse(...)`.
uuidParse.parse is not a function (in an ES Module context)
Trying to use CommonJS `require`'d module in an ES Module environment without proper interop, or attempting `import uuidParse from 'uuid-parse'` which yields an empty object or `undefined`.
fix
Switch to `require` syntax or, preferably, migrate to a modern, actively maintained UUID library that supports ES Modules, such as `uuid`.
ReferenceError: Buffer is not defined (in a browser environment)
This package relies on Node.js's global `Buffer` object, which is not available in standard browser environments.
fix
Use a bundler (like Webpack or Rollup) that automatically provides a Buffer polyfill for browser compatibility, or manually include a Buffer polyfill. Alternatively, switch to a UUID library designed for universal (Node.js and browser) usage.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
uuid-parse — npm install uuid-parse · libregistry