
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
Redux easy mode. Kill the boilerplate and focus on the logic.
Features simple reducer functions. Blosm automatically takes care of merging a new copy of the changed state. Internally Blosm uses Snoman for native immutable data structures.
npm i blosm
const { createStore } = require('redux')
const blosm = require('blosm')
// init blosm with the initial app state
const db = blosm({
tacos: []
})
// register actions with .on() and its corresponding reducer with .do()
db.on('add-taco')
.get(s => s.tacos)
.do((tacos, data) => tacos.push(data))
// shorthand version
db.on('add-taco', s => s.tacos).do((tacos, data) => tacos.push(data))
// pass the master reducer function to redux
const store = createStore(db.reducer)
Any array prototype methods that would normally mutate the array are proxied and will instead return a new copy of the array with the changes.
| Blosm | Redux |
|---|---|
const { createStore } = require('redux')
const blosm = require('blosm')
const db = blosm({
food: {
tacos: []
}
})
|
const { createStore } = require('redux')
const initialState = {
food: {
tacos: []
}
}
|
To modify an object, return an object containing the changes. It is also possible to use Snoman object convenience methods.
| Blosm | Redux |
|---|---|
const { createStore } = require('redux')
const blosm = require('blosm')
const db = blosm({
food: {
favorite: 'pasta',
type: 'italian'
}
})
|
const { createStore } = require('redux')
const initialState = {
food: {
favorite: 'pasta',
type: 'italian'
}
}
|
To modify primitives, return the changed value.
| Blosm | Redux |
|---|---|
const { createStore } = require('redux')
const blosm = require('blosm')
const db = blosm({
person: {
age: 22
}
})
|
const { createStore } = require('redux')
const initialState = {
person: {
age: 22
}
}
|
blosm(initialState)Returns a new Blosm object to configure state reducers
Object - Initial state for applicationconst app = blosm({ name: 'lucy', age: 22 })
blosm().on(action)Registers a new action with the Blosm object
string - Name of the action typeconst app = blosm({ name: 'lucy', age: 22 })
app.on('birthday')
blosm().on().get(selector)Specifies a selector to query your object graph. A selector minimizes the need of working with the entire object structure in your reducer. A selector will also be used to construct an object diff for Redux
function - A function selector querying your object graph. e.g. state => state.food.mexican.tacosconst app = blosm({ name: 'lucy', age: 22 })
app.on('birthday').get(s => s.age)
blosm().on().do(updateReducer)Specifies the update function to perform on the specified action. In Redux terminology this would the reducer corresponding to a particular action.
function - A reducer function for the specified action. Whatever is returned from this function will be used to construct a new object for Redux. The updateReducer function receives two parameters:
get()dispatch({ type: 'birthday', data: 1 })const app = blosm({ name: 'lucy', age: 22 })
app.on('birthday').get(s => s.age).do((age, data) => age + data)
blosm().reducerReturns the smart reducer to be passed into Redux createStore method.
const app = blosm({ name: 'lucy', age: 22 })
app.on('birthday').get(s => s.age).do((age, data) => age + data)
const store = redux.createStore(app.reducer)
Install necessary dependencies
npm i
Run the tests
npm test
Contributions welcome. Submit a Pull Request :)
FAQs
Redux helper
We found that blosm 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.