Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vault-storage

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vault-storage - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/secure.d.ts

2

package.json
{
"name": "vault-storage",
"version": "1.0.0",
"version": "1.0.1",
"description": "Vault, a tiny yet robuts storage library for your browser applications",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,2 +0,109 @@

# simplified
Simplified.js is a sub-1KB minimalist JavaScript library providing jQuery-like DOM manipulation, event handling, class and CSS management, basic animations, traversal, and a plugin system for extensibility, all wrapped in a clean, chainable syntax.
# vault
`vault` is a sophisticated browser-based storage library that leverages the power of IndexedDB, offering significant improvements over traditional LocalStorage. As a high-performance, asynchronous solution for client-side storage, `vault` provides an intuitive and easy-to-use API to interact with IndexedDB, making client-side data storage efficient and scalable.
## Features
- **Simple API**: Easy-to-use asynchronous methods for common IndexedDB operations.
- **Proxy-based Access**: Intuitive syntax for data manipulation using JavaScript Proxy.
- **Flexible and Lightweight**: Minimal setup required, suitable for various web applications.
## Installation
Install `vault-storage` using npm:
```bash
npm install vault-storage --save
```
Or using yarn:
```bash
yarn add vault-storage
```
## Usage
First, import `vault-storage` in your project:
```javascript
import vault from 'vault-storage';
```
### Initializing
Before performing any operations, initialize `vault-storage`:
```javascript
// Initialize with default settings
await vault.init();
```
### Setting Values
Store data using the `set` method:
```javascript
await vault.set('yourKey', { any: 'data' });
```
### Getting Values
Retrieve data using the `get` method:
```javascript
const data = await vault.get('yourKey');
console.log(data);
```
### Removing Values
Remove data using the `remove` method:
```javascript
await vault.remove('yourKey');
```
### Clearing All Data
Clear all data from the store:
```javascript
await vault.clear();
```
### Getting Store Length
Get the count of entries in the store:
```javascript
const count = await vault.length();
console.log(count);
```
## API Reference
- `init(database?: IDBDatabase, store?: string)`: Initialize the database. Optional custom database and store name can be provided.
- `set(key: string, value: any)`: Store data in the database.
- `get(key: string)`: Retrieve data from the database.
- `remove(key: string)`: Remove data from the database.
- `clear()`: Clear all data from the database.
- `length()`: Get the count of entries in the database.
## Contributing
Contributions to `vault-storage` are welcome. Please ensure that your code adheres to the existing style and includes tests covering new features or bug fixes.
## License
`vault-storage` is [MIT licensed](./LICENSE).
---
### Notes:
- Adjust and expand the sections as necessary to fit the specifics of `vault-storage`.
- If you have additional configuration options, advanced usage, or a more complex API, include those details in the README.
- Consider adding a `LICENSE` file to your repository if not already present.
- Include information about testing, contribution guidelines, and any other relevant documentation links if available.
- Personalize the introduction and description to reflect the unique features and benefits of `vault-storage`.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc