rangoo94/easen-tools

View on GitHub
packages/uuid/src/shared/hexBytes.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
// Initialize array of HEX bytes representation
const hexBytes = []

// Build that array
for (let i = 0; i <= 0xff; i++) {
  hexBytes[i] = (i < 16 ? '0' : '') + i.toString(16)
}

module.exports = hexBytes