
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
choo-shortcut
Advanced tools
Shortcut access to parts of the state
anywhere in your app.
Useful to simulate "contexts", avoid passing down the state
to hell. It's again a ridiculous little function.
npm i choo-shortcut
// flowers-context.js
var createShortcut = require('choo-shortcut')
var shortcut = createShortcut(function (state, emitter) {
return state.flowers
})
module.exports = shortcut.set
module.exports.getFlowers = shortcut.get
In your main file:
app.use(require('./flowers-context'))
Then anywhere in your app
var { getFlowers } = require('../flowers-context')
getFlowers()
// state.flowers that has been set somewhere
shortcut = createShortcut(reducer(state, emitter))
Creates a new shortcut (context store). reducer
is a function which "reduces" the state to the part that should be stored. It gets the typical state
and emitter
of a Choo store.
shortcut.set(state, emitter)
The store that should be passed to app.use
.
shortcut.get()
Returns the current value that's stored.
FAQs
Shortcut access to parts of the state anywhere in your app
The npm package choo-shortcut receives a total of 0 weekly downloads. As such, choo-shortcut popularity was classified as not popular.
We found that choo-shortcut 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.