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

alexa-ability-lambda-handler

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alexa-ability-lambda-handler - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

16

lib/index.js

@@ -6,13 +6,15 @@ "use strict";

});
exports.default = createAbilityHandler;
function createAbilityHandler(ability) {
exports.handleAbility = handleAbility;
function handleAbility(ability) {
return function (event, context) {
return function abilityHandler(event, context) {
ability.handle(event).then(function (req) {
console.log(req.toJSON()), context.succeed(req.toJSON());
}, function (err) {
return context.fail(err);
ability.handle(event, function (err, req) {
if (err) {
context.fail(err);
} else {
context.succeed(req.toJSON());
}
});
};
}
{
"name": "alexa-ability-lambda-handler",
"version": "0.2.0",
"version": "0.3.0",
"description": "",

@@ -30,4 +30,4 @@ "main": "lib/index.js",

"peerDependencies": {
"alexa-ability": "^0.3.4"
"alexa-ability": "^0.5.0"
}
}

@@ -7,11 +7,11 @@ # alexa-ability-lambda-handler

import { Ability, events } from 'alexa-ability';
import handle from 'alexa-ability-lambda-handler';
import { handleAbility } from 'alexa-ability-lambda-handler';
const ability = new Ability();
ability.on(events.LAUNCH, function(req) {
ability.on(events.launch, function(req) {
req.say("Testing testing one two three.").end();
});
export const handler = handle(ability);
export const handler = handleAbility(ability);
```
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