fs-base
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

fs-base

File system is a good place to store data without worrying how to view, access, or move them.

import { Store } from "fs-base";

const store = new Store("path-to-store");
const coll = store.collection("collection-name");

for (let i = 0; i < 1000; i++) {
  coll
    .collection(`Collection ${i}`)
    .document("info")
    .set({
      title: `Info of Collection ${i}`,
      description: `Something...`,
      time: Date.now(),
      abcdefg: "hijklmnopqrstuvwxyz",
    });
}

const data = coll
  .collections()
  .map((c) => c.list())
  .flat()
  .map((d) => d.get());

console.log(data);
coll.delete();

Package Sidebar

Install

npm i fs-base

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

10 kB

Total Files

6

Last publish

Collaborators

  • jacoblincool