This package has been deprecated

Author message:

Please use an actual database instead.

fs8

1.0.1 • Public • Published

fs8

It's a stable JSON database module that doesn't lose your data due to high traffic and comes with built-in LZMA file compression.

Usage

const fs8 = require("fs8");

Good Practice

If you're running on a large database which is very frequently altered, you might not want to save the data every time there is an edit.

Instead, it is recommended that you save on an interval. Here is an example, which saves the data variable to data.fs8 every minute.

const fs8 = require("fs8");
const data = fs8.load("data.fs8");
setInterval(() => {
	fs8.save("data.fs8", data);
}, 60000);
// Then do whatever you want with `data` down here.

This way, if the process ever crashes, you'll lose a minute of data, but you'll also not have to deal with the high processing power of repeatedly stringifying, compressing, and writing.

Readme

Keywords

none

Package Sidebar

Install

npm i fs8

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.73 kB

Total Files

4

Last publish

Collaborators

  • grantgryczan