编码+提交

This commit is contained in:
kangkang520
2018-11-12 23:18:51 +08:00
commit 3d0c2070eb
8 changed files with 236 additions and 0 deletions

25
README.md Normal file
View File

@ -0,0 +1,25 @@
# ini-decode
ini file decoder for Node.js, using this util, you can read `.ini` file and even parse it to `.d.ts` file
## installation
```
npm install ini-decode
```
## usage
```typescript
import fs from 'fs'
import { decode } from 'ini-decode'
//parse
const { json: configs, dts } = decode(fs.readFileSync('/path/to/ini'))
//this is configs
console.log(configs)
//you can write dts to a .d.ts file
fs.writeFileSync('/path/to/ini.d.ts', dts)
```