1.0.0 • Published 3 years ago
crns-json v1.0.0
crns-json
Efficient and lightweight parsing and conversion between JSON and CRNS (.chase
) files.
Installation
npm install --save crns-json
Example
const crns = require("crns-json");
// Parse a CRNS file and write to JSON
crns.parse("./game.chase").write("./game.json");
// Convert the JSON result to CRNS, and log it
crns.convert("./game.json").log();
Usage
Both parse
and convert
take a dir
parameter, and have strict file ending checks.
Additionally, they both return a class object (GameData
and CRNSGame
respectively) which have:
write(dir)
: writes the data to a file and returns the class objectlog()
: logs the data to the console
as methods.
Links
- crns-lang (syntax highlighting for
.chase
files)
1.0.0
3 years ago