
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
indexddb-rest
Advanced tools
Use indexeddb like api rest.
##Install
npm -i indexddb-rest
##Setup
We use this library like indexeddb, so we need make a litle setup.
note: All created tables have id automatically.
let ref = require('indexddb-rest');
const IndexedDBREST = ref.IndexedDBREST;
function onError(err) {
}
let db = new IndexedDBREST( 'myDB', 1, [{name: 'table1'}, {name: 'table2'}], onError);
##Create data
When you add a value to a table, the id is automatically incremented. Return a copy of the item created.
db.post('table1',{some: 'nanananana'}).then(response => {
console.log('save something', response);
}).catch(error => {
console.log('bad something happened');
});
If you dont need generate a row with autoid, use this.
db.post('table1',{some: 'nanananana'}, false).then(response => {
console.log('save something', response);
}).catch(error => {
console.log('bad something happened');
});
##Read data
We have two methods: get and list.
Get return one element of the table.
List return all elememts of the table.
Return a copy of the item solicited.
db.get('table1', 142563652).then(response => {
console.log('the item', response);
}).catch(error => {
console.log('not exist the item');
});
Return a copy of the list.
db.list('table1').then(response => {
console.log('the list', response);
}).catch(error => {
console.log('');
});
##Update data Note: if the id no exist, the item is save automatically. Return a copy of the item updated.
db.put('table1',{id: 142563652, some: 'nanananana'}).then(response => {
console.log('upddate something', response);
});
##Delete data
All items have a id, so when we delete a item use the id of item for delete it.
Return true or false.
db.delete('table1', 142563652).then(response => {
console.log('delete the item', response);
});
FAQs
Base para persistir datos en el exporador
We found that indexddb-rest 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.