> For the complete documentation index, see [llms.txt](https://nodebook.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nodebook.js.org/text/txt.md).

# TXTNotebook

"TXTNotebook" is a customized class used for `.txt` files.

## Usage

### TXTNotebook Setup

```javascript
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.

```javascript
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.

```javascript
textbook.erase('R');
// Erases the first instance of 'R'

textbook.erase('.', { flag: 'g' });
// Erases all instances of '.'
```
