New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

local-storage-query

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

local-storage-query

lacal storage query

latest
Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Local Storage Query

Local Storage Query is a utility class designed to simplify interactions with the browser's localStorage API. This package provides methods to easily manage data stored in the browser's localStorage in asynchronous way, allowing for seamless integration with client side based JavaScript library and framework.

Installation

You can install the package via npm or yarn:

npm install local-storage-query
yarn add local-storage-query

Usage

import DB from "local-storage-query";

/*-------------------------Create an instance of DB-------------------*/
const db = new DB({
   collectionName: "yourCollectionName",
   latency: 1000,
});

/*-------------------------Methods-------------------*/
/* 
  success response : response res?.response.data.data or message 
  error response :  error?.message
*/
const res = await db.create(data);

const res = await db.deleteById(id);

const res = await db.updateById(id, item);

const res = await db.findById(id);

const res = await db.find(null);
const res = await db.find({ name: "user" });

const res = await db.search({ keyName: searchTerm });

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to contribute to this project.

License

This package is open-source and available under the MIT License.

Keywords

javasript

FAQs

Package last updated on 06 Oct 2025

Related posts