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

lambda-router

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-router - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

readme.md

16

lib/LambdaRouter.js

@@ -6,2 +6,5 @@ 'use strict';

/**
* A routing framework for AWS Lambda
*/
class LambdaRouter {

@@ -20,2 +23,7 @@

/**
* LambdaRouter class
*
* @param {Object} options contains 'basedir', 'routes'
*/
constructor(options) {

@@ -41,4 +49,4 @@ this._routes = {};

*
* @param name
* @returns {*}
* @param {string} name
* @returns {Function|null}
*/

@@ -52,4 +60,4 @@ getRoute(name) {

*
* @param name
* @param option
* @param {string} name
* @param {Object} option contains 'module', 'action'
*/

@@ -56,0 +64,0 @@ setRoute(name, option) {

{
"name": "lambda-router",
"version": "0.0.1",
"description": "A routing flamework for AWS Lambda",
"version": "0.1.0",
"description": "A routing framework for AWS Lambda",
"main": "index.js",

@@ -9,3 +9,4 @@ "scripts": {

"lint": "eslint . --ignore-path .gitignore",
"cover": "istanbul cover _mocha"
"cover": "istanbul cover _mocha && codecov",
"docs": "documentation readme -s 'API Docs' -g lib/**/*.js"
},

@@ -28,2 +29,4 @@ "repository": {

"devDependencies": {
"codecov": "^1.0.1",
"documentation": "^4.0.0-beta4",
"eslint": "^2.9.0",

@@ -30,0 +33,0 @@ "eslint-config-node-style-guide": "^3.0.0",

@@ -105,2 +105,15 @@ 'use strict';

it('setRoute by invalid handler', () => {
try {
router.setRoute('directRoute', {
handler: 'not a function',
});
} catch (e) {
assert.ok(true);
return ;
}
assert.fail('expects occurring Error but never thrown');
});
it('setRoute after changing baseDir', () => {

@@ -107,0 +120,0 @@ router.baseDir = '';

Sorry, the diff of this file is not supported yet

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