UNPKG

ciallorize

Version:

Ciallorize your bundled js into ascii art.

17 lines (13 loc) 496 B
const validate = require('./validate_input.js'); const tokenize = require('./tokenize.js'); const error_msg = require('./error_msg.js'); const paint = require('./paint.js'); module.exports = async (code, maskPath, options={ fontWidthToHeightRatio: 16/40, characterCompensation: 0.95 })=>{ validate(code) const sequence = tokenize(code); console.log(' '+error_msg.rainbowText('Ciallorizing')+' your code...') return paint(sequence, maskPath, options); }