aws-lambda-event-identifier
Advanced tools
Comparing version 1.0.1 to 1.0.2
26
index.js
@@ -10,17 +10,19 @@ exports.eventIdentifier = function(data){ | ||
} | ||
if(data.Records.length>0){ | ||
if(data.Records[0].EventSource == "aws:sns"){ | ||
return "sns"; | ||
if(data.Records){ | ||
if(data.Records.length>0){ | ||
if(data.Records[0].EventSource == "aws:sns"){ | ||
return "sns"; | ||
} | ||
if(data.Records[0].eventSource == "aws:dynamodb"){ | ||
return "dynamodb"; | ||
} | ||
if(data.Records[0].eventSource == "aws:s3"){ | ||
return "s3"; | ||
} | ||
if(data.Records[0].eventSource == "aws:kinesis"){ | ||
return "s3"; | ||
} | ||
} | ||
if(data.Records[0].eventSource == "aws:dynamodb"){ | ||
return "dynamodb"; | ||
} | ||
if(data.Records[0].eventSource == "aws:s3"){ | ||
return "s3"; | ||
} | ||
if(data.Records[0].eventSource == "aws:kinesis"){ | ||
return "s3"; | ||
} | ||
} | ||
return null; | ||
} |
{ | ||
"name": "aws-lambda-event-identifier", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Used to return a type of input event from aws lambda", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1453
27