From d692f416b64883eb35d988f5228d545c98edb4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Mon, 29 Jul 2019 09:50:28 -0300 Subject: [PATCH] Fix code style: missing parens, double quote and semicolon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/bindings/http/commons.js | 4 ++-- lib/specs/spec_0_3.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bindings/http/commons.js b/lib/bindings/http/commons.js index f713822..f3170bf 100644 --- a/lib/bindings/http/commons.js +++ b/lib/bindings/http/commons.js @@ -4,8 +4,8 @@ const Constants = require("./constants.js"); function sanityContentType(contentType) { if(contentType) { return Array.of(contentType) - .map(c => c.split(";")) - .map(c => c.shift()) + .map((c) => c.split(";")) + .map((c) => c.shift()) .shift(); } diff --git a/lib/specs/spec_0_3.js b/lib/specs/spec_0_3.js index 371a412..13256f2 100644 --- a/lib/specs/spec_0_3.js +++ b/lib/specs/spec_0_3.js @@ -78,7 +78,7 @@ Spec03.prototype.check = function(ce){ var valid = isValidAgainstSchema(toCheck); Array.of(toCheck) - .filter((tc) => (typeof tc.data) !== 'string') + .filter((tc) => (typeof tc.data) !== "string") .filter((tc) => tc["datacontentencoding"]) .forEach((tc) => { throw {message: "invalid payload", errors: [ @@ -94,7 +94,7 @@ Spec03.prototype.check = function(ce){ throw {message: "invalid payload", errors: [ "Unsupported content encoding: " + dce ]}; - }) + }); if(!valid) { throw {message: "invalid payload", errors: isValidAgainstSchema.errors};