
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
@robtaussig/local-store-js
Advanced tools
yarn add @robtaussig/local-store-js
#entry.js
// Return instance of LocalStore
const LocalStore = require('@robtaussig/local-store-js')({ global: false });
// Access through window.LocalStore
require('@robtaussig/local-store-js');
window.LocalStore.demo();
// You can inspect the database schema in devtools -> Application -> IndexedDB -> LocalStore
window.LocalStore.insert({
table: 'cars',
object: {
licensePlate: '43435',
ownerEmail: 'abc@gmail.com',
color: 'blue',
}
});
// Search by indexed key
window.LocalStore.select({
table: 'cars',
where: {
ownerEmail: 'abc@gmail.com',
}
})
.then(res => console.log(res));
// Search by primary key
window.LocalStore.select({
table: 'cars'
}, '43435')
.then(res => console.log(res));
// Every time you make a change to the database schema, you must increment the database version (using integers only)
const DATABASE_VERSION = 1;
// You can seed data here as well
const DATABASE_SCHEMA = {
tables: [
{
name: 'cars',
primaryKey: 'licensePlate',
indexes: [{
name: 'Owner Email',
key: 'ownerEmail',
}]
},
{
name: 'people',
primaryKey: 'email',
},
],
// Seed data below
objects: [
{
table: 'cars',
object: {
licensePlate: '12345',
ownerEmail: 'robert.taussig@gmail.com',
color: 'blue',
},
},
{
table: 'people',
object: {
email: 'robert.taussig@gmail.com',
},
},
],
};
window.LocalStore.createMigrations(DATABASE_SCHEMA, DATABASE_VERSION);
table: String object: Object
FAQs
Promise-based ORM to interface with IndexedDB
We found that @robtaussig/local-store-js 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.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.