Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.13 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.13 KB

Mongo UUID Helper

Build Status Coverage Status Known Vulnerabilities

A NodeJS UUID helper, based on the C# driver UUID helper

Currently only implements JUUID and CSUUID, PR's welcome.

Installation

npm install mongo-uuid-helper

Usage

const uuidHelper = require('mongo-uuid-helper')

const juuidBin = uuidHelper.juuidStringToBin('ae51c849-3f2a-4a37-986d-55ed5b02307f')
const csuuidBin = csuuidHelper.csuuidStringToBin('0c552563-77d2-4562-a9bd-739ba2c6e1fe')
const jUUID = uuidHelper.binToJUUIDString(juuidBin)
const csUUID = uuidHelper.binToCSUUIDString(csuuidBin)