@functions-api/core
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -61,3 +61,3 @@ const Errors = require('../errors.js') | ||
try { | ||
var func = new this(...args) | ||
let func = new this(...args) | ||
return await func.run() | ||
@@ -64,0 +64,0 @@ } catch(e) { |
@@ -5,3 +5,3 @@ const Errors = require('../errors.js') | ||
const BodyHandler = require('./body.js')(BaseHandler) | ||
return class JSONBodyHandler extends BodyHandler { | ||
return class JsonBodyHandler extends BodyHandler { | ||
constructor (...args) { | ||
@@ -8,0 +8,0 @@ super(...args) |
{ | ||
"name": "@functions-api/core", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A small framework for building APIs as functions (to run in a FaaS, like Lambda)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
const TestHandler = require('./test-handler.js') | ||
const BodyHandler = require('../../lib/handlers/body.js')(TestHandler) | ||
const AbstractBodyHandler = require('../../lib/handlers/body.js') | ||
const AbstractHandler = require('../../lib/handlers/abstract.js') | ||
const Errors = require('../../lib/errors.js') | ||
describe('BodyHandler', () => { | ||
const BodyHandler = AbstractBodyHandler(TestHandler) | ||
test('throws an error if no body is defined', () => { | ||
@@ -7,0 +10,0 @@ var call = () => { new BodyHandler() } |
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
12615
297