Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score100%•This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers



Downloads3/wk
•Publisheda month ago (0.9.0)
Node.js Filesystem Storage Module
Node.js Filesystem Storage Module
See @storage/main for the bigger picture.
This package provides an implementation of the storage module interface.
This stores values in individual files under a directory hierarchy via
Node fs calls. By default this is
under a .store dir under the current working dir. This can be overridden via
the environment var STORE_FS_ROOT.
Each level of the key becomes a directory up to the last segment which becomes a JSON file.
eg: ["one", "two", "three"] -> .store/one/two/three.json
Import mapping: "$store": "jsr:@storage/node-fs"
Example
import * as store from "jsr:@storage/node-fs"; import { assertEquals } from "jsr:@std/assert"; await store.setItem(["foo", "hello"], "world"); assertEquals(await store.hasItem(["foo", "hello"]), true); assertEquals(await store.getItem(["foo", "hello"]), "world"); await store.clearItems(["foo"]); assertEquals(await store.hasItem(["foo", "hello"]), false);
Built and signed on
GitHub Actions
Add Package
deno add jsr:@storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";
Import directly with a jsr specifier
import * as node_fs from "jsr:@storage/node-fs";
Add Package
pnpm i jsr:@storage/node-fs
pnpm dlx jsr add @storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";
Add Package
yarn add jsr:@storage/node-fs
yarn dlx jsr add @storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";
Add Package
vlt install jsr:@storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";
Add Package
npx jsr add @storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";
Add Package
bunx jsr add @storage/node-fs
Import symbol
import * as node_fs from "@storage/node-fs";