-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The library has several formating options, which is nice, however it only understands one of them when you "parse" a string with the from() method, which is weird.
Steps to reproduce:
const MUUID = require('uuid-mongodb');
const uuid1 = MUUID.v4();
console.log(uuid1); // Binary { ... }
const string = uuid1.toString('N');
console.log(string); // 9cea27b4d0e44781826ede1b6f378d6f
const uuid2 = MUUID.from(string); // Error: Invalid UUIDAn optional parsing parameter like we have in the toString method would make a lot of sense, e.g. MUUID.from(string, 'N');
mattbf and vnugent
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request