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

alexa-ability-express-handler

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.3.0 to 0.3.1

.eslintrc

39

lib/index.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.handleAbility = handleAbility;
var _once = require('lodash/once');
var _handleAbility = require('./handleAbility');
var _once2 = _interopRequireDefault(_once);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function handleAbility(ability) {
return function abilityHandler(req, res, next) {
// make sure we have a body
if (!req.body) {
noBodyWarning();
return next();
}
// TODO validate body? or should ability handle that..
ability.handle(req.body, function (err, req) {
if (err) return next(err);
res.json(req.toJSON());
});
};
}
//
// Misc warnings
//
var noBodyWarning = (0, _once2.default)(function () {
return console.log('Warning: No request body found.');
Object.defineProperty(exports, 'handleAbility', {
enumerable: true,
get: function get() {
return _handleAbility.handleAbility;
}
});
{
"name": "alexa-ability-express-handler",
"version": "0.3.0",
"description": "",
"version": "0.3.1",
"description": "Publish an alexa-ability as an express route",
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./scripts/test.sh"
},

@@ -13,3 +13,17 @@ "repository": {

},
"keywords": [],
"bugs": {
"url": "http://github.com/nickclaw/alexa-ability-express-handler/issues"
},
"keywords": [
"amazon",
"alexa",
"skills",
"skill",
"kit",
"echo",
"ability",
"express",
"middleware",
"alexa-ability"
],
"author": {

@@ -27,8 +41,17 @@ "name": "Nicholas Clawson",

"babel-cli": "^6.4.5",
"babel-eslint": "^4.1.8",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-1": "^6.3.13"
"babel-preset-stage-1": "^6.3.13",
"babel-register": "^6.4.3",
"chai": "^3.4.1",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^4.0.0",
"eslint-plugin-react": "^3.16.1",
"mocha": "^2.3.4",
"sinon": "^1.17.2",
"sinon-chai": "^2.8.0"
},
"peerDependencies": {
"alexa-ability": "^0.5.0"
"alexa-ability": "^0.6.0"
}
}

@@ -1,2 +0,2 @@

# alexa-ability-express-handler
# alexa-ability-express-handler [![Build Status](https://travis-ci.org/nickclaw/alexa-ability-express-handler.svg?branch=master)](https://travis-ci.org/nickclaw/alexa-ability-express-handler)

@@ -3,0 +3,0 @@ ### Example

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