1.0.1 • Published 8 years ago

hexstringescaper v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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: ÿ
1.0.1

8 years ago

1.0.0

8 years ago