Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-07-17 13:25:49 -03:00
parent f5e0ce6a84
commit 6960e42c24
1 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,8 @@ const isString = (v) => (typeof v) === "string";
const isObject = (v) => (typeof v) === "object";
const isDefined = (v) => v && (typeof v) != "undefined";
const isDefinedOrThrow = (v) =>
(isDefined(v) ? () => true
(isDefined(v)
? () => true
: (() => {throw nullOrIndefinedPayload})());
const isValidPayloadOrThrow = (v) =>