{"id":16261,"library":"uuid-parse","title":"UUID String to Buffer Parser","description":"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.","status":"abandoned","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/zefferus/uuid-parse","tags":["javascript","uuid","parse","guid","rfc4122"],"install":[{"cmd":"npm install uuid-parse","lang":"bash","label":"npm"},{"cmd":"yarn add uuid-parse","lang":"bash","label":"yarn"},{"cmd":"pnpm add uuid-parse","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only and explicitly unmaintained. For modern ESM projects, consider the `uuid` package's `parse` and `stringify` functions instead.","wrong":"import uuidParse from 'uuid-parse';","symbol":"uuidParse","correct":"const uuidParse = require('uuid-parse');"},{"note":"The `parse` function is a named export available via CommonJS destructuring. Direct ESM named imports are not supported.","wrong":"import { parse } from 'uuid-parse';","symbol":"parse","correct":"const { parse } = require('uuid-parse');"},{"note":"The `unparse` function is a named export available via CommonJS destructuring. Direct ESM named imports are not supported.","wrong":"import { unparse } from 'uuid-parse';","symbol":"unparse","correct":"const { unparse } = require('uuid-parse');"}],"quickstart":{"code":"const uuidParse = require('uuid-parse');\n\nconst uuidString = '797ff043-11eb-11e1-80d6-510998755d10';\n\n// Parse a UUID string into a Buffer\nconst bytes = uuidParse.parse(uuidString);\nconsole.log('Parsed bytes:', bytes.toString('hex'));\n// Example with a target buffer and offset\nconst targetBuffer = Buffer.alloc(32);\nconst offset = 8;\nuuidParse.parse(uuidString, targetBuffer, offset);\nconsole.log('Parsed into target buffer:', targetBuffer.toString('hex'));\n\n// Unparse a Buffer into a UUID string\nconst string = uuidParse.unparse(bytes);\nconsole.log('Unparsed string:', string);\n\n// Unparsing from a specific offset in a buffer\nconst unparsedFromOffset = uuidParse.unparse(targetBuffer, offset);\nconsole.log('Unparsed from offset:', unparsedFromOffset);","lang":"javascript","description":"Demonstrates parsing a UUID string into a Buffer and unparsing a Buffer back into a string, including usage with offsets and target buffers."},"warnings":[{"fix":"Replace `uuid-parse` with `@lukeed/uuid` (lightweight) or `uuid` (feature-rich). Example: `uuid.parse()` and `uuid.stringify()` for `uuid` package.","message":"This 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.","severity":"breaking","affected_versions":">=1.0.0"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"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.","message":"Due 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.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Access the methods as `uuidParse.parse(...)` or `uuidParse.unparse(...)`.","cause":"Attempting to call `uuidParse()` directly after `require('uuid-parse')` when it's an object with `parse` and `unparse` methods.","error":"TypeError: uuidParse is not a function"},{"fix":"Switch to `require` syntax or, preferably, migrate to a modern, actively maintained UUID library that supports ES Modules, such as `uuid`.","cause":"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`.","error":"uuidParse.parse is not a function (in an ES Module context)"},{"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.","cause":"This package relies on Node.js's global `Buffer` object, which is not available in standard browser environments.","error":"ReferenceError: Buffer is not defined (in a browser environment)"}],"ecosystem":"npm"}