slice2json
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

slice2json

Parser for the Slice language.

Usage

import {readFileSync} from 'fs';
import {parse} from 'slice2json';
 
const contents = readFileSync('MySlice.ice', 'utf-8');
const result = parse(contents);
/*
  {
    "pragmaOnce": true,
    "includes": [...],
    "modules": {
      "type": "module",
      "name": "MyModule",
      "content": [...]
    }
  }
*/

See types.ts for the schema of returned object.

Readme

Keywords

none

Package Sidebar

Install

npm i slice2json

Weekly Downloads

2,015

Version

0.3.1

License

GPL-2.0

Unpacked Size

81.1 kB

Total Files

29

Last publish

Collaborators

  • aikoven