
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
handsome-box
Advanced tools
Lightweight data store for web application, and there are only 6 simple api methods for U.Please enjoy it
Lightweight data store for web application, and there are only 6 simple api methods for U.Please enjoy it
npm install --save handsome-box
import Store from 'handsome-box';
var t1 = new Store('t1');
var t2 = new Store('t2');
var obj = {};
t1.bind(window).setItem('name', {names: ['jack', 'lilith'], data: {age: 20, money: '10k'}}, {mode: 'sessionStorage', expire: -(Date.now() + 2000)}).setItem('money', 998);
t2.bind(obj).setItem('age', 20).setItem('aaa', 'aaa').removeItem('aaa');
console.log('t1.name', t1.getItem('name'));
console.log('t1.money', t1.getItem('money', true));
console.log('t2.age', t2.getItem('age'));
console.log(t1.list(), t2.list());
t2.clear();
console.log(t2.list());
console.log(obj);
bind handsome-box instance to your custom object
params: (obj: Object)
for saving data
params: (key: String, value: any, option: Object)
option example: {mode: "sessionStorage", expire: Date.now() + 3600}
mode optional value: "cookie"
| "sessionStorage"
| "localStorage"
expire shold be a timestamp
for getting data
params: (key: String, isDetail: Boolean)
for removing data
params: (key: String)
clear all saved data
list all key in one instance
indexDB and webSQL support
FAQs
Lightweight data store for web application, and there are only 6 simple api methods for U.Please enjoy it
The npm package handsome-box receives a total of 1 weekly downloads. As such, handsome-box popularity was classified as not popular.
We found that handsome-box demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.