hexstringescaper
v1.0.1
Published
Escapes hex strings from "FF" format to "\xFF" hex equivalent
Readme
Hex String Escaper
Escapes hex strings from "FF" format to "\xFF" hex equivalent. Useful for dynamically creating hex values (such as for a rgb value).
Install
npm install hexstringescaper
Usage
var util = require("util"),
HexStringEscaper = require("hexstringescaper"),
hEsc = HexStringEscaper.escaper;
console.log(hEsc["1F"]); // logs a non-readable symbol
console.log(util.format("This is escaped hex: %s", hEsc["FF"]));
This is escaped hex: ÿ
