Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
indexdb-store
Advanced tools
npm install indexdb-store
<script src="https://unpkg.com/indexdb-store@latest/dist/index.umd.js"></script>
<script type="text/javascript">
console.log(ReactUtils.Cipher)
</script>
import { indexDBStore } from 'indexdb-store'
const store = indexDBStore.createStore('WDB', 'myStore', {
version: 1,
onupgradeHandler: (store, request, event) => {
//do transactions that can only happen on upgrade events.
store.createIndex('IdIndex', 'id', { unique: true })
console.log(request, event)
},
})
//write
store.readwrite(db => {
db.add({ id: '1', name: '1 name' }, '1')
db.add({ id: '2', name: '2 name' }, '2')
})
//get all entries
store.entries().then(data => {
console.log({ entries: data })
})
//get all values
store.values().then(values => {
console.log('values: ', { values })
})
//Read
store.readonly.get('2').then(value => {
console.log('value with key 2 is: ', value)
})
//COUNT: Retrieve the number of records matching the given key
//COUNT: Object API
const range = IDBKeyRange.bound('0', '2')
store.count(range).then(result => {
console.log(`count is : `, result)
})
//COUNT: Function API
store('readonly', db => {
const request = db.count('2')
request.onsuccess = function () {
console.log(`count is : `, this.result)
}
})
//delete
store.del('1').then(() => {
console.log('Delete complete for key 1')
})
store.readonly.get('1').then(value => {
console.log('value with key 1 is now: ', value)
})
//Clear all the data in store.
store.clear().then(() => {
console.log('store is cleared.')
})
FAQs
Tool for working with indexedDB in a js Promises. written in Typescript
The npm package indexdb-store receives a total of 25 weekly downloads. As such, indexdb-store popularity was classified as not popular.
We found that indexdb-store 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.