
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language 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
The npm package @robtaussig/local-store-js receives a total of 7 weekly downloads. As such, @robtaussig/local-store-js popularity was classified as not popular.
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
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

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