
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
provide and use$ npm i contextus
import context from 'contextus'
const myContext = context()
function a() {
b()
return `Amazing!`
}
function b() {
c()
}
function c() {
d()
}
function d() {
const value = myContext.use()
console.log(`d: ${value}`)
myContext.provide(`More specific wins!`, e)
console.log(`d: ${value}`)
}
function e() {
console.log(`e: ${myContext.use()}`)
}
const returnValue = myContext.provide(`Spectacular!`, a)
//=> d: Spectacular!
//=> e: More specific wins!
//=> d: Spectacular!
console.log(returnValue)
//=> Amazing!
try {
myContext.use()
} catch (e) {
console.log(e.message)
}
//=> context: use called outside provide
See the type definitions for more documentation.
Stars are always welcome!
For bugs and feature requests, please create an issue.
For pull requests, please read the contributing guidelines.
This is not an official Google product.
FAQs
The context you know and love, but framework agnostic!
We found that contextus 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
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers