nth-file
v1.0.4
Published
Nodejs 对文件某一行的处理库
Downloads
3
Readme
FileLine
介绍
Node.js operate file's nth line
Nodejs 对文件某一行的处理库
APIS
以下都为同步函数 ALL ARE SYNC
insert(fileName, index, data);
update(fileName, index, data);
delete(fileName, index);
getLines(fileName);
read(fileName,index);
deleteLines(fileName, indexArr);
example
const fileLine = require('nth-line');
let fileName = "./1.txt";
let arr = [1,2,3]
fileLine.deleteLines(fileName,arr);