Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Latest commit

 

History

History
46 lines (36 loc) · 455 Bytes

README.md

File metadata and controls

46 lines (36 loc) · 455 Bytes

node-suc

这是啥么包?

Suc 配置文件 解析器的 NodeJS 实现

用法

const Suc = require('node-suc').Suc;
let suc = new Suc;

let obj = suc.parse(`
[num] 999

[bool] false

[list]
abc
cba
torzo

string >hello, world!
`);
/*
{
  num: 999,
  bool: false,
  list: [ 'abc', 'cba', 'torzo' ],
  string: 'hello, world!'
}
*/

suc.stringify(obj);
/*
[num] 999
[bool] false
[list]
abc
cba
torzo

string >hello, world!
*/