Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

contextor

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contextor - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

47

index.d.ts

@@ -1,22 +0,27 @@

export interface Contextor {
/**
* Create a new context.
* @returns {self}
*/
create: () => this;
/**
* Set a value in the current context.
* @param {string} key - The identifier key.
* @param {*} value - The value.
* @throws {ReferenceError} On missing current context.
*/
set: (key: string, value: any) => this;
/**
* Get a value in the current context.
* @param {string} key - The identifier key.
* @param {*} defaultValue - The default value to return in case.
* @returns {*} The value or default value for missing key.
* @throws {ReferenceError} On missing value for given key in current context.
*/
get: (key: string, defaultValue: any) => any;
declare namespace contextor {
interface Contextor {
/**
* Create a new context.
* @returns {self}
*/
create: () => this;
/**
* Set a value in the current context.
* @param {string} key - The identifier key.
* @param {*} value - The value.
* @throws {ReferenceError} On missing current context.
*/
set: (key: string, value: any) => this;
/**
* Get a value in the current context.
* @param {string} key - The identifier key.
* @param {*} defaultValue - The default value to return in case.
* @returns {*} The value or default value for missing key.
* @throws {ReferenceError} On missing value for given key in current context.
*/
get: (key: string, defaultValue: any) => any;
}
}
declare const contextor: contextor.Contextor;
export = contextor;
{
"name": "contextor",
"description": "Package allowing to pass a context along an asynchronous process",
"version": "0.1.1",
"version": "0.2.0",
"author": "Thomas Prelot <tprelot@gmail.com> (https://github.com/Gnucki)",

@@ -6,0 +6,0 @@ "contributors": [],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc