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

decl-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decl-api - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

20

index.js

@@ -356,3 +356,3 @@ var Q, assert, callActionFromReq, callActionFromReqAndRespond, checkConfig, checkConfigEntry, createExpressRestApi, createSocketIoApi, docs, enhanceJsonSchemaWithDefaults, getConfigDefaults, handleBooleanParam, handleNumberParam, handleParamType, normalizeAction, normalizeActions, normalizeParam, normalizeParams, normalizeType, path, sendErrorResponse, sendSuccessResponse, serveClient, stringifyApi, toJson, types, wrapActionResult, _, _socketBindings,

assert((call.action != null) && typeof call.action === "string");
assert((call.params != null) && Array.isArray(call.params));
assert((call.params != null) && typeof call.params === "object");
assert(call.id != null ? typeof call.id === "string" || typeof call.id === "number" : true);

@@ -362,7 +362,21 @@ foundBinding = false;

return function(actions, binding) {
var action, result;
var action, p, paramName, paramValue, params, result, _ref;
action = actions[call.action];
if (action != null) {
foundBinding = true;
result = binding[call.action].apply(binding, call.params);
params = [];
_ref = action.params;
for (paramName in _ref) {
p = _ref[paramName];
paramValue = null;
if (call.params[paramName] != null) {
paramValue = call.params[paramName];
} else if (!p.optional) {
throw new Error("expected param: " + paramName);
}
if (paramValue != null) {
params.push(handleParamType(paramName, p, paramValue));
}
}
result = binding[call.action].apply(binding, params);
return Q(result).then(function(result) {

@@ -369,0 +383,0 @@ var response;

2

package.json
{
"name": "decl-api",
"version": "0.0.10",
"version": "0.0.11",
"description": "declarative api definition for REST and real time apis",

@@ -5,0 +5,0 @@ "main": "index.js",

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