Comparing version 0.5.1 to 0.5.2
@@ -93,3 +93,5 @@ 'use strict'; | ||
* @param {object} subject Object to validate | ||
* @param {string} [messagePrefix] Error message prefix | ||
* @param {object} options Error message options | ||
* @param {string} [options.message] Error message | ||
* @param {string} [options.status] Error message status | ||
* @return {object} Subject (for call chains) | ||
@@ -99,8 +101,8 @@ */ | ||
var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, | ||
_ref3$messagePrefix = _ref3.messagePrefix, | ||
messagePrefix = _ref3$messagePrefix === undefined ? null : _ref3$messagePrefix, | ||
_ref3$message = _ref3.message, | ||
message = _ref3$message === undefined ? null : _ref3$message, | ||
_ref3$status = _ref3.status, | ||
status = _ref3$status === undefined ? null : _ref3$status; | ||
var res = Vouch.validate(schema, subject, { messagePrefix: messagePrefix, status: status }); | ||
var res = Vouch.validate(schema, subject, { message: message, status: status }); | ||
if (res instanceof Error) { | ||
@@ -107,0 +109,0 @@ throw res; |
{ | ||
"name": "jsft-vouch", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Functional validation / assertion of objects with structures defined with json-schema.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
21245
451