1.0.0 • Published 2 years ago

simplefilehandler v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

simplefilehandler

sff is supposed to make file reads/writes easy. There is no need to close a file.

Create a handler

All handlers have the same ability.

const { FileHandler } = require("simplefilehandler");

var file = new FileHandler("file.txt");

Read a file's content as a string

var content = file.read();

Write to a file

file.write("- Get gas");

Append to a file

file.append("\n- Go to the grocery store");

If file exists

file.exists(); // true