oid
Ketch Object ID library in TypeScript.
Example OID's:
2GUTcoh54LjIgVmziQ5812
2GUTiLeCNBq6uBhavno132
2GUToEhtDHr8qBMLay1KPV
Installation
npm install -D @ketch-com/oid-js
Usage
NewOID
To create a new OID, use newOID
:
const o = newOID()
toString()
To get the string representation of an existing OID, use o.toString()
:
const s = o.toString()
toBytes()
To get the byte array representation of an existing OID, use o.toBytes()
:
const b = o.toBytes()