As designed by Peter Saville.
Takes a string of ASCII and encodes it as embeddable SVG and CSS.
npm i fac-it
Include in project
const fac-it = require("fac-it");
Available methods:
fac-it.encode()
* @params {String} a string of ASCII
* @returns {Array} an array of hex values
fac-it.render()
* @params {Array} an array of hex values - as returned by encode()
* @params {Object} an options object - { type:String, size:String, direction:String }
* @returns {String} SVG or CSS code block of encoded string
The type option field should be "svg" or "css" depending on desired output, size denotes width of character in px, and direction can be either "row" or "column". The returned CSS is a flexbox, and as such responsive. The SVG is not, and will just generate on a single row/column.