Developing for Eno with JavaScript
Installation from npm:
npm install enolib
Getting started
Create an eno document, for instance intro.eno
:
Greeting: Hello World!
A minimal example to read this file with enolib
:
const enolib = require('enolib');
const fs = require('fs');
const input = fs.readFileSync('intro.eno', 'utf-8');
const document = enolib.parse(input);
console.log( document.field('Greeting').requiredStringValue() ); // prints 'Hello World!'
Links
Package on npm - https://npmjs.com/package/enolib/
Repository on GitHub - https://github.com/eno-lang/enolib/