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

nodecaf

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodecaf - npm Package Compare versions

Comparing version 0.11.12 to 0.11.13

1

lib/api.js

@@ -205,2 +205,3 @@ const assert = require('assert');

input.fork = fork.bind(app, input);
input.call = (fn, ...args) => fn.call(app, input, ...args);

@@ -207,0 +208,0 @@ const req = input.req = input.req || generateRequestObject(method, path, input);

6

lib/main.js

@@ -70,2 +70,4 @@ const

this.call = (fn, ...args) => fn.call(this, { ...this.global, ...this }, ...args);
this.conf = {};

@@ -163,6 +165,2 @@ this.state = 'standby';

call(fn, ...args){
return fn.call(this, { ...this.global, conf: this.conf, log: this.log }, ...args);
}
trigger(method, path, input){

@@ -169,0 +167,0 @@ return this._api.trigger(method, path, input);

{
"name": "nodecaf",
"version": "0.11.12",
"version": "0.11.13",
"description": "Nodecaf is a light framework for developing RESTful Apps in a quick and convenient manner.",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -39,3 +39,3 @@ # [Nodecaf](https://gitlab.com/GCSBOSS/nodecaf)

// Perform your server initialization logic.
async startup({ conf, log, global }){
async startup({ conf, log, call }){

@@ -45,3 +45,3 @@ },

// Perform your server finalization logic.
async shutdown({ conf, log, global }){
async shutdown({ conf, log, call }){

@@ -164,3 +164,3 @@ }

```js
function({ req, res, next, query, params, body, flash, conf, log, headers }){
function({ req, res, next, query, params, body, flash, conf, log, headers, call }){
// Do your stuff.

@@ -183,2 +183,4 @@ }

your application.
- `call`: Calls any user function passing the handler args as the first argument.
Signature: `call(userFunc, ...extraArgs)`.
- Also all keys of the [globally exposed object](#expose-globals) are available

@@ -395,3 +397,3 @@ as handler args for all routes.

global.libX = new LibXInstance();
}
}
});

@@ -398,0 +400,0 @@ ```

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