Socket
Socket
Sign inDemoInstall

uuid-parse

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    uuid-parse

RFC4122 UUID parser


Version published
Weekly downloads
338K
increased by6.12%
Maintainers
1
Install size
6.30 kB
Created
Weekly downloads
 

Readme

Source

uuid-parse Build Status

NOTE: This module is no longer maintained

Simple, fast parsing and unparsing of RFC4122 UUIDS.

Features:

  • Parses and unparses UUIDs to and from Buffer to String

Quickstart

npm install uuid-parse
const uuidParse = require('uuid-parse');

API

uuidParse.parse(id[, buffer[, offset]])

uuidParse.unparse(buffer[, offset])

Parse and unparse UUIDs

  • id - (String) UUID(-like) string
  • buffer - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Buffer is used
  • offset - (Number) Starting index in buffer at which to begin writing. Default: 0

Example parsing and unparsing a UUID string

const bytes = uuidParse.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
const string = uuidParse.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'

Testing

npm test

Acknowledgments

Please make sure to check out the repository that originated these functions: node-uuid. These functions were removed from a recent version of that library and I wanted to make sure they were still exposed for the packages who were dependent on them.

Keywords

FAQs

Last updated on 26 Feb 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc