Uuid: Parse/unparse methods removed in v3??

Created on 10 Dec 2016  路  3Comments  路  Source: uuidjs/uuid

I missed the reason why parse() and unparse() methods were removed in v3.0.0. Why remove unparse()?

uuid.unparse(buffer);    // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' 
uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' 
wontfix duplicate

All 3 comments

To keep this library focused on generating uuids. Unparsing them gets into realm of validation etc and that I have determined to be outside of the scope of this library.

@defunctzombie But how can we generate an UUID string from a buffer ?

From another perspective, if you decide to remove String / Buffer conversion from the scope of the lib, I think uuid.v* should always return the same kind of object. Either a String or a Buffer.

Another lib could do the work of parsing an UUID Buffer into a String and conversely.

Actually I found this one: https://github.com/zefferus/uuid-parse ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josias-r picture josias-r  路  6Comments

BinitaBharati picture BinitaBharati  路  9Comments

sam-s4s picture sam-s4s  路  6Comments

mrtnbroder picture mrtnbroder  路  6Comments

nemoload picture nemoload  路  3Comments