📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

split-lowdb

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

split-lowdb

A simple way to split lowdb into multiple files.

1.0.10
latest
Source
npm
Version published
Weekly downloads
93
1228.57%
Maintainers
1
Weekly downloads
 
Created
Source

split-lowdb

A simple way to split lowdb into multiple files.

npm install split-lowdb

Sync Usage

import { SplitLowDBSync } from "split-lowdb";
const splitDB = new SplitLowDBSync({
  name: "lists", // Folder name
  // baseDir: "" - Defaults to process.cwd()
});
splitDB.name; // "lists"

splitDB.set("names", ["Aaren", "Aarika"]); // saves in lists/names.json
splitDB.get("names"); // ["Aaren", "Aarika"]
splitDB.size; // +1
splitDB.store; // {"names": ["Aaren", "Aarika"]}
splitDB.delete("names"); // Deletes lists/names.json file and removes it's key.
splitDB.clear(); // Deletes all json files and keys.

Async Usage

import { SplitLowDBAsync } from "split-lowdb";
const splitDB = new SplitLowDBAsync({
  name: "lists", // Folder name
  // baseDir: "" - Defaults to process.cwd()
});
splitDB.name; // "lists"

await splitDB.set("names", ["Aaren", "Aarika"]); // saves in lists/names.json
await splitDB.get("names"); // ["Aaren", "Aarika"]
splitDB.size; // +1
splitDB.store; // {"names": ["Aaren", "Aarika"]}
await splitDB.delete("names"); // Deletes lists/names.json file and removes it's key.
await splitDB.clear(); // Deletes all json files and keys.

License

MIT

Keywords

lowdb

FAQs

Package last updated on 27 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts