Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aikoven/slice2json
Parser for the Slice language
https://github.com/aikoven/slice2json
Last synced: about 2 months ago
JSON representation
Parser for the Slice language
- Host: GitHub
- URL: https://github.com/aikoven/slice2json
- Owner: aikoven
- Created: 2017-11-23T11:58:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:20:02.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T17:27:12.769Z (2 months ago)
- Language: TypeScript
- Size: 1020 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slice2json
Parser for the Slice language.
## Usage
```ts
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`](/src/types.ts) for the schema of returned object.