New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@smallwins/lambda

Package Overview
Dependencies
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smallwins/lambda - npm Package Compare versions

Comparing version 4.22.1 to 5.0.0

4

index.js
var lambda = require('./src/lambda')
var dynamo = require('./src/dynamo')
var dynamo = require('aws-dynamodb-lambda-trigger/lambda')
var sns = require('./src/sns')
lambda.sources = {dynamo:dynamo, sns:sns}
lambda.triggers = {dynamo:dynamo, sns:sns}
module.exports = lambda
{
"name": "@smallwins/lambda",
"version": "4.22.1",
"version": "5.0.0",
"description": "Author your AWS Lambda functions as node style errbacks.",

@@ -38,2 +38,3 @@ "main": "index",

"async": "^2.0.0-rc.2",
"aws-dynamodb-lambda-trigger": "^4.2.0",
"aws-sdk": "^2.2.47",

@@ -40,0 +41,0 @@ "chalk": "^1.1.3",

@@ -131,3 +131,3 @@ [ ![Codeship Status for smallwins/lambda](https://codeship.com/projects/2e4082e0-d808-0133-2035-1eae90b9310e/status?branch=master)](https://codeship.com/projects/143109)

exports.handler = lambda.sources.dynamo.save(save)
exports.handler = lambda.triggers.dynamo.save(save)
```

@@ -140,7 +140,8 @@

- `lambda.local(fn, fakeEvent, (err, result)=>)` run a Lambda locally offline by faking the event obj
- `lambda.sources.dynamo.all(...fns)` run on INSERT, MODIFY and REMOVE
- `lambda.sources.dynamo.save(...fns)` run on INSERT and MODIFY
- `lambda.sources.dynamo.insert(...fns)` run on INSERT only
- `lambda.sources.dynamo.modify(...fns)` run on MODIFY only
- `lambda.sources.dynamo.remove(...fns)` run on REMOVE only
- `lambda.triggers.dynamo.insert(fn)` run on INSERT only
- `lambda.triggers.dynamo.modify(fn)` run on MODIFY only
- `lambda.triggers.dynamo.remove(fn)` run on REMOVE only
- `lambda.triggers.dynamo.all(fn)` run on INSERT, MODIFY and REMOVE
- `lambda.triggers.dynamo.save(fn)` run on INSERT and MODIFY
- `lambda.triggers.dynamo.change(fn)` run on INSERT and REMOVE

@@ -147,0 +148,0 @@ A handler looks something like this:

@@ -10,7 +10,7 @@ var lambda = require('../')

// get an instance of the lambda
var insert = lambda.sources.dynamo.insert(handler)
var modify = lambda.sources.dynamo.modify(handler)
var remove = lambda.sources.dynamo.remove(handler)
var all = lambda.sources.dynamo.all(handler)
var save = lambda.sources.dynamo.save(handler)
var insert = lambda.triggers.dynamo.insert(handler)
var modify = lambda.triggers.dynamo.modify(handler)
var remove = lambda.triggers.dynamo.remove(handler)
var all = lambda.triggers.dynamo.all(handler)
var save = lambda.triggers.dynamo.save(handler)

@@ -110,3 +110,3 @@ test('insert trigger', t=> {

// invoke the lambda
var handler = lambda.sources.dynamo.modify(function(event, callback) {
var handler = lambda.triggers.dynamo.modify(function(event, callback) {
callback(Error('test err'))

@@ -113,0 +113,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