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.5.2/API.md).
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 = Any.prototype.describe.call(this);
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];
@@ -311,7 +311,7 @@ internals.Array = class extends Any {
311
311
 
312
312
  describe() {
313
313
 
314
- const description = Any.prototype.describe.call(this);
314
+ const description = super.describe();
315
315
 
316
316
  if (this._inner.ordereds.length) {
317
317
  description.orderedItems = [];
@@ -87,7 +87,7 @@ internals.Boolean = class extends Any {
87
87
 
88
88
  describe() {
89
89
 
90
- const description = Any.prototype.describe.call(this);
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', null, state, options);
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 = Any.prototype.describe.call(this);
618
+ const description = super.describe();
619
619
 
620
620
  if (description.rules) {
621
621
  for (let i = 0; i < description.rules.length; ++i) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "joi",
3
3
  "description": "Object schema validation",
4
- "version": "13.5.2",
4
+ "version": "13.6.0",
5
5
  "homepage": "https://github.com/hapijs/joi",
6
6
  "repository": "git://github.com/hapijs/joi",
7
7
  "main": "lib/index.js",