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

lambda-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-wrapper - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

index.js

@@ -23,3 +23,3 @@

try {
this.lambdaModule.handler(event, lambdacontext);
this.lambdaModule.handler(event, lambdacontext, callback);
} catch (ex) {

@@ -26,0 +26,0 @@ throw(ex);

{
"name": "lambda-wrapper",
"version": "0.0.5",
"version": "0.0.6",
"description": "Wrapper for running Amazon Lambda modules locally",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},

@@ -9,0 +9,0 @@ "repository": {

var testMod1 = {
handler: function(event, context) {
if (event.test === 'success') {
context.succeed('Success');
}
if (event.test === 'fail') {
context.fail('Fail');
}
handler: function(event, context) {
if (event.test === 'success') {
context.succeed('Success');
}
if (event.test === 'fail') {
context.fail('Fail');
}
}
};
var testMod2 = {
handler: function(event, context) {
context.succeed(event);
}
handler: function(event, context) {
context.succeed(event);
}
};
var testMod3 = {
handler: function(event, context, callback) {
callback(null, event);
}
}
var wrapper = require('../index.js');

@@ -52,2 +58,10 @@ var expect = require('chai').expect;

});
it('wrap + run module 3 (callback notation)', function(done) {
var w1 = wrapper.wrap(testMod3);
w1.run({test: 'cbsuccess'}, function(err, response) {
expect(response.test).to.be.equal('cbsuccess');
done();
});
});
});
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