
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Functional state management library inspired by and compatible with redux.
It is a drop-in replacement for redux, aimed at reducing boilerplate. Similar philosophy applies, except for the motion of reducers and actions, which are replaced by mutations. Created in mind with small applications, that want to use state management similar to redux that seamlessly works with react, but without all of the ceremonials that come with redux "boilerplate".
To install latest version of mutox
:
$ npm install --save mutox
import { createStore, mutate, get } from 'mutex'
let store = createStore({
counter: 0
})
store.subscribe(() => {
console.log(store.getState())
})
const increment = x => x + 1
const decrement = x => x - 1
const counter = mutate('counter')
store.dispatch(counter(increment))
// { counter: 1 }
store.dispatch(counter(increment))
// { counter: 2 }
store.dispatch(counter(decrement))
// { counter: 1 }
Support for asynchrony is built-in - your mutations and all methods support async/await
, so you can do stuff like:
const MY_URL = 'https://random.org/integers/?num=1&min=1&max=100&col=1&base=10&format=plain&rnd=new'
const getJson = url => fetch(url).then(response => response.json())
store.dispatch(
counter(
get('data')(
getJson(MY_URL) // this returns a Promise<Number>
),
increment
)
)
MIT
FAQs
Functional state management library
The npm package mutox receives a total of 1 weekly downloads. As such, mutox popularity was classified as not popular.
We found that mutox 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.