pua2ot/node/test2.js
raw| 1 | |
| 2 | const fs = require('node:fs'); |
| 3 | const puaNode = require("./pua2ot-node-min.js"); |
| 4 | |
| 5 | let test_text = "vallgar hınſ gᷓ vͬ vlꝼr aurgoðı e͛ oꝺꝺau͛ıar e͛o ꝼᷓ kōn͛."; |
| 6 | |
| 7 | try { |
| 8 | test_text = fs.readFileSync("./load-me.txt", "utf8"); |
| 9 | } catch (err) { |
| 10 | console.error("Error reading file:", err); |
| 11 | } |
| 12 | |
| 13 | puaNode.options.language = "is"; |
| 14 | |
| 15 | test_result = puaNode.convert(puaNode.cleanup_string(test_text)); |
| 16 | |
| 17 | console.log(test_result); |