File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # MODL Interpreter in TypeScript
2+
3+ This repository contains an implementation of a [ MODL] ( https://www.modl.uk/ ) interpreter in TypeScript.
4+
5+ ## Installation With NPM
6+
7+ Use ` npm install --save modl-interpreter `
8+
9+ ## TypeScript Example
10+
11+ ``` TypeScript
12+ import { Interpreter } from ' ./modl-interpreter/Interpreter' ;
13+
14+ const interpreter = new Interpreter ();
15+
16+ const jsonString = interpreter .interpretToJsonString (' x = a MODL string' );
17+
18+ console .log (jsonString );
19+ ```
20+
21+ This example produces the output:
22+ ``` json
23+ {"x" :" a MODL string" }
24+ ```
25+
26+ ## JavaScript Example
27+
28+ ``` JavaScript
29+ const modl = require (' modl-interpreter' );
30+
31+ const jsonString = modl .interpreter .interpretToJsonString (' x = a MODL string' );
32+
33+ console .log (jsonString);
34+ ```
35+ This example produces the same output as above.
You can’t perform that action at this time.
0 commit comments