joi 13.5.2 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Imagine you run facebook and you want visitors to sign up on the website with re
|
|
|
16
16
|
This is joi, joi allows you to create *blueprints* or *schemas* for JavaScript objects (an object that stores information) to ensure *validation* of key information.
|
|
17
17
|
|
|
18
18
|
# API
|
|
19
|
-
See the detailed [API Reference](https://github.com/hapijs/joi/blob/v13.
|
|
19
|
+
See the detailed [API Reference](https://github.com/hapijs/joi/blob/v13.6.0/API.md).
|
|
20
20
|
|
|
21
21
|
# Example
|
|
22
22
|
|
|
@@ -150,7 +150,7 @@ internals.Alternatives = class extends Any {
|
|
|
150
150
|
|
|
151
151
|
describe() {
|
|
152
152
|
|
|
153
|
-
const description =
|
|
153
|
+
const description = super.describe();
|
|
154
154
|
const alternatives = [];
|
|
155
155
|
for (let i = 0; i < this._inner.matches.length; ++i) {
|
|
156
156
|
const item = this._inner.matches[i];
|
package/lib/types/array/index.js
CHANGED
|
@@ -87,7 +87,7 @@ internals.Boolean = class extends Any {
|
|
|
87
87
|
|
|
88
88
|
describe() {
|
|
89
89
|
|
|
90
|
-
const description =
|
|
90
|
+
const description = super.describe();
|
|
91
91
|
description.truthy = [true].concat(this._inner.truthySet.values());
|
|
92
92
|
description.falsy = [false].concat(this._inner.falsySet.values());
|
|
93
93
|
return description;
|
|
@@ -47,7 +47,7 @@ internals.Number = class extends Any {
|
|
|
47
47
|
result.value = Math.round(result.value * precision) / precision;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
result.errors = isNumber ? null : this.createError('number.base',
|
|
50
|
+
result.errors = isNumber ? null : this.createError('number.base', { value }, state, options);
|
|
51
51
|
return result;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -615,7 +615,7 @@ internals.Object = class extends Any {
|
|
|
615
615
|
|
|
616
616
|
describe(shallow) {
|
|
617
617
|
|
|
618
|
-
const description =
|
|
618
|
+
const description = super.describe();
|
|
619
619
|
|
|
620
620
|
if (description.rules) {
|
|
621
621
|
for (let i = 0; i < description.rules.length; ++i) {
|