1.3.0 • Published 5 years ago
tang-base-node-utils v1.3.0
tang-base-node-utils
一个让文件+目录的读写
更简单的语法糖
& 一个让交互
更简单的语法糖
const newFile = new Base("nonexistent-file").createAsFile()
newFile.write("what ever").moveTo("nonexistent-path")
newFile.handleLineByLine((str, i, close) => {
console.log(`${i} -> ${str}`)
if (i >= 5) {
close() // quit?
}
})
async function func() {
const inputStr = question("not non string to be accepted.", defaultValIfNeeded)
const inputNum = questionNumber("quit until valid number.", defaultValIfNeeded)
const specialInput = questionUntil("quit until valid string", (inputStr) => {
return /^a (young|naive|simple) guy$/.test(inputStr)
})
}
func()
1.3.0
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago