binary-uuid

JSON →
library 2.0.3 ·javascript
verified Jun 5, 2026

Converts UUID v1 strings to BINARY(16) buffers with time-ordering scrambling optimized for MySQL indexing. Version 2.0.3 is current, stable, and rarely updated. Key differentiator: reorders UUID v1 bytes so that the timestamp component (which changes fastest) is placed in the middle of the binary representation, improving B-tree index performance. Supports both ESM imports and CommonJS require. Includes helpers to convert between string UUID and Buffer representations.