1.1.1 • Published 2 years ago
editline v1.1.1
const result1 = el.loadstr("./example2.txt", 1) console.log(result1) //expected output: false const result2 = el.loadstr("./example2.txt", 2) console.log(result2) //expected output: true const resul3 = el.loadstr("./example2.txt", 3) console.log(result3) //expected output: Error: The value you entered is invalid. Usage: b:<1 | 0>
### edit
The edit() function allows you to edit the contents of a specified line in a specified file.
example:
- example.txt
hoge fuga hoge
- example.js
const el = require('editline') el.edit("example.txt", 2, "hoge")
- (new)example.txt
hoge hoge hohe
### math
The math() function allows you to calculate numbers for a specified line in a specified file.
- example.txt
1
- example.js
const el = require('editline') el.math("example.txt", 1, "+1")
- (new)example.txt
2