cirru-vectors-format

0.1.4 • Public • Published

Cirru Vectors Format

A subset of EDN to store Cirru source code.

[
["a" "b" "c d"]
["e" ["f" ["g"] "h"]]
["i"]
]

Usage

npm i --save cirru-vectors-format
{write, parse} = require('cirru-vectors-format')
file = '\n[["a" ["b"]] ["c"] ["d"]]\n'
result = parser.parseProgram file
expected = ok: yes, data: [['a', ['b']], ['c'], ['d']], rest: ''
data = [["a", "b", "c d"],["e", ["f", ["g"], "h"]], ["i"]]
result = write data
expected = '\n[\n["a" "b" "c d"]\n["e" ["f" ["g"] "h"]]\n["i"]\n]\n'

Test

cd test/
coffee write.coffee
coffee parse.coffee
cd real-demo-test
coffee two-way-check.coffee

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i cirru-vectors-format

Weekly Downloads

2

Version

0.1.4

License

MIT

Last publish

Collaborators

  • jiyinyiyong