
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
The idea behind Hacksaw is contextual store which means you have one store which you can generate sub stores using contexts and also all model instances will be shared among contexts.
Hacksaw is a data store library for javascript. You can store all the states along the app life time with view stores.
The idea behind Hacksaw is contextual store which means you have one store which you can generate sub stores using contexts and also all model instances will be shared among contexts.
npm install hacksaw --save
import { createStore } from 'hacksaw';
const store = createStore({
tables: {
products: {},
users: {
relations: {
products: {
type: Array,
table: 'products'
}
}
}
}
});
// products table is empty
store.products.all; // []
// create view stores
const bestViewStore = store.view('best');
const trendingViewStore = store.view('trending');
bestViewStore.products.all; // []
trendingViewStore.products.all; // []
// add a product to view store 'best'
bestViewStore.products.put({ id: 1, name: 'A book' });
// add a product to view store 'trending'
trendingViewStore.products.put({ id: 2, name: 'Trending book' });
// global products table has 2 items
store.products.all
// [{ id: 1, name: 'A book' }, { id: 2, name: 'Trending book' }]
// view store 'best' has 1 item
bestViewStore.all;
// [{ id: 1, name: 'A book' }]
// create another view store and populate data
const anotherViewStore = store.view('another-context');
anotherViewStore.products.populate(i => i.id === 1);
anotherViewStore.products.first
// { id: 1, name: 'A book' }
// clean trending view store
trendingViewStore.clean();
trendingViewStore.products.all; // []
store.products.all // [{ id: 1, name: 'A book' }, { id: 2, name: 'Trending book' }]
// add data has relations
store.users.put({ id: 1, name: 'Plato', products: [{ id: 1, name: 'Apology' }] });
store.users.first;
// { id: 1, name: 'Plato', products: [{ id: 1, name: 'Apology' }] }
store.products.all;
// [{ id: 1, name: 'Apology' }, { id: 2, name: 'Trending book' }]
FAQs
The idea behind Hacksaw is contextual store which means you have one store which you can generate sub stores using contexts and also all model instances will be shared among contexts.
We found that hacksaw 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.