bytey
A simple JavaScript/NodeJS module that provides byte-array utility.
Installing
Browser
Node JS
npm install bytey
Usage
// In NodeJS, import the module.const bytey = ; // Convert hex string to byte-array. bytey;// -> [ 104, 54, 40, 249, 237, 181, 233, 209 ] // Convert a byte-array to a hex string.bytey;// -> '683628f9edb5e9d1' // Convert UTF8 string to byte-array.bytey;// -> [ 227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175 ] // Convert byte-array to UTF8 string.bytey;// -> 'こんにちは' // Check if two byte arrays are equals.bytey;// -> false