test.js 297 B

1234567891011121314
  1. const npos = require('npos')
  2. const parser = npos.parser()
  3. const buffer = Buffer.from('\x1B\x40Hola mundo\x0A\x1B\x61\x49probando')
  4. console.log(buffer)
  5. parser.parse(buffer).then(function (ast) {
  6. console.log(ast)
  7. npos.textualize(ast).then(function (txt) {
  8. console.log(txt)
  9. })
  10. })