TXTNotebook
extends Nodebook
"TXTNotebook" is a customized class used for .txt files.
Usage
TXTNotebook Setup
const Nodebook = require('nodejs-notebook');
const textbook = new Nodebook.TXTNotebook('studies');note(value)
Similar to addLine() but it does not automatically go to the next line.
string value:
The value to add to the file.
textbook.note('Rome wasn\'t built in a day.\nScience is hard.');erase(value, options)
Erase word(s) from the .txt file.
string value:
The string to erase it from.
object options:
options.flag: The flag to delete in RegExp.
textbook.erase('R');
// Erases the first instance of 'R'
textbook.erase('.', { flag: 'g' });
// Erases all instances of '.'Last updated
Was this helpful?