Skip to content

Commit ce3d1ba

Browse files
authored
RunKit compatible example
1 parent 2409a0a commit ce3d1ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
JavaScript version ( Browser and Node.js ) of SimplePEG
99

1010
```
11-
import {SPEG} from 'simplepeg';
12-
const parser = new SPEG();
11+
const simplepeg = require('simplepeg');
12+
const parser = new simplepeg.SPEG();
1313
14-
parser.parse_grammar('GRAMMAR test a->"A";);
14+
parser.parse_grammar('GRAMMAR test a->"A";');
1515
const ast = parser.parse_text('A');
16-
console.log(JSON.strinfigy(ast, null 4));
16+
console.log(JSON.stringify(ast, null, 4));
1717
```
1818

1919
# Grammar example

0 commit comments

Comments
 (0)