Socket
Socket
Sign inDemoInstall

f

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

f - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

14

lib/f.js

@@ -54,6 +54,9 @@ 'use strict';

let fnpath = path.join(process.cwd(), 'f', name, 'index.js');
let fnjpath = path.join(process.cwd(), 'f', name, 'function.json');
if (!config.local.cache) {
delete require.cache[require.resolve(fnpath)];
delete require.cache[require.resolve(fnjpath)];
}
name = require(fnpath);
name.json = require(fnjpath);
} catch (e) {

@@ -69,3 +72,12 @@ callback(new Error('Could not find local function "' + name + '"'));

params.buffer = payload;
return name(params, callback);
return name(params, (err, result, headers) => {
if (err) {
callback(err);
}
headers = headers || {};
let oheaders = (name.json && name.json.http && name.json.http.headers) || {};
oheaders = typeof oheaders === 'object' ? oheaders : {};
headers = Object.assign(oheaders, headers);
callback(err, result, headers);
});
}

@@ -72,0 +84,0 @@

2

package.json
{
"name": "f",
"version": "1.2.0",
"version": "1.2.1",
"description": "Functional Microservice Request Library",

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

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