New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

lw-db

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lw-db

Light Weight DataBase - A node:fs wrapper for easy file and data management

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Light Weight DataBase

lw-db is a basic node:fs wrapper for easier file and data management

ES5

const DataBase = require("lw-db");

const db = new DataBase("path/to/your/db/folder");

ES6

import DataBase from "lw-db";

const db = new DataBase("path/to/your/db/folder");

Compatibility

Path:

  • Supports only relative path (starts from active directory)
  • Active directory

OS:

  • Windows
  • Linux
  • Mac (no tested)

Etc:

  • ES5
  • ES6
  • TypeScript support

Important notes

When passing a path do not start your path with a . or / unless you want to do ... The active directory system automatically appends / to the end of the active directory.

Example:

db.readSync("some-folder/some-file"); // do
db.readSync("some-file"); // do

db.readSync("/some-file"); // don't
db.readSync("C:\\some-folder"); // don't

The active directory is static and defined in the constructor call.

const db = new DataBase("path/to/your/db/folder"); // supports both relative and absolute path

Pros:

  • Only kilobytes of ram required
  • Easy to use
  • Fully local
  • Easy setup
  • Uses relative path for shorter paths

Cons:

  • Not advised for large scale projects
  • Doesn't have complex DB calls like search or filter.

Disclaimer

THIS MODULE IS IN ACTIVE DEVELOPMENT! I AM NOT LIABLE IN ANY WAY FOR ANY OR FORM FOR ANY DATA LEAK OR DATA LOSS!

Keywords

database

FAQs

Package last updated on 23 Apr 2024

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