New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ctx

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ctx

A minimalist context resolver.

latest
npmnpm
Version
0.3.0
Version published
Weekly downloads
240
-10.11%
Maintainers
1
Weekly downloads
 
Created
Source

ctx

ctx is a minimalist context resolver.

install

npm install ctx

example

var ctx = require('ctx');

var $ = ctx();

$
  .define('a', [], function() { return 7; })
  .define('b', [], function() { return 3; })
  .define('c', [ 'a', 'b' ], function() { return $.a * $.b; })
  .define('d', [], function() { return 2; })
  .define('e', [ 'c', 'd' ], function() { return $.c * $.d; })
.resolve(function() {
  console.log($.a, $.b, $.c, $.d, $.e);
});

results in

7, 3, 21, 2, 42

Keywords

dependency

FAQs

Package last updated on 05 Mar 2013

Did you know?

Socket

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.

Install

Related posts