con

confile

read and write simple file for JSON/INI/TXT

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

  • Simple file read/write module

** info

Simple file read/write module, with Sync mode for JSON/INI/TXT typed text files.

配置文件读写模块,统一采用同步方式处理.支持 单行/JSON/INI/TXT/RAW 格式的文本文件

** usage

npm install confile --save

** example

var confile = require('confile');

var txtFileLines = confile.readTxt('./test/testfile.txt'); //list console.log(txtFileLines.length);

var jsonFromFile = confile.readJSON('./test/testfile.json'); //object console.log(typeof jsonFromFile);

var iniObj = confile.readIni('./test/testfile.ini'); //object console.log(iniObj);

confile.writeTxt('./test/testfile.txt', ['1','2','3']); confile.writeJSON('./test/testfile.json', {foo:'bar'}); confile.writeIni('./test/testfile.ini', {foo:'bar'});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100