Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joelesko/jcon-js
JCON configuration parser for JS
https://github.com/joelesko/jcon-js
configuration javascript jcon json
Last synced: 30 days ago
JSON representation
JCON configuration parser for JS
- Host: GitHub
- URL: https://github.com/joelesko/jcon-js
- Owner: joelesko
- License: mit
- Created: 2018-11-26T19:32:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-27T06:37:11.000Z (almost 6 years ago)
- Last Synced: 2024-10-02T03:03:08.828Z (about 1 month ago)
- Topics: configuration, javascript, jcon, json
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Summary
JCON is a configuration format that keeps the familiarity of JSON, but requires less syntax -- making it easier to read and write.[JCON Home Page](https://jconformat.org)
## Features
- Separation by line breaks, not commas.
- No quotation marks for strings or keys.
- Support for line comments.
- Support for multi-line strings.
- Small footprint (~ 7k). No dependencies.## At a Glance
```
{
// this is a comment
myKey: {key: this is a string
boolean: true
number: 123list: [
this is item 1
this is item 2
]
multiline: `
This is a
multiline
string
`
}
}```
## Install
```
npm install jcon-parser
```## Usage
```
let jcon = require('jcon-parser');
jcon.parseFile('yourFile.jcon', (config)=>{
console.log(config);
});
// or...
let config = jcon.parse(jconString);```