vault-storage
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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", |
111
README.md
@@ -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`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28087
14
365
110