Comparing version 9.5.0 to 9.5.1
@@ -47,6 +47,11 @@ /** | ||
* | ||
* @param {boolean} useStrict | ||
* If set, the schemas will be unioned using strict validation rules. | ||
* > The default value for this flag will be changed to `false` in a future release. | ||
* @default true | ||
* | ||
* @returns {JSON} | ||
* An RTTC exemplar. | ||
*/ | ||
module.exports = function coerceExemplar (value, allowSpecialSyntax, treatTopLvlUndefinedAsRef) { | ||
module.exports = function coerceExemplar (value, allowSpecialSyntax, treatTopLvlUndefinedAsRef, useStrict) { | ||
@@ -57,2 +62,6 @@ // Default `treatTopLvlUndefinedAsRef` to `true`. | ||
// Default `useStrict` to `true`. | ||
// (will be changed to false in a future release) | ||
if (_.isUndefined(useStrict)) { useStrict = true; } | ||
// If the provided value is `undefined` at the top level... | ||
@@ -113,3 +122,3 @@ if (_.isUndefined(value)) { | ||
var pattern = _.reduce(valuePart.slice(1), function (patternSoFar, item) { | ||
patternSoFar = union(patternSoFar, _recursivelyCoerceExemplar(item), true, true); | ||
patternSoFar = union(patternSoFar, _recursivelyCoerceExemplar(item), true, useStrict); | ||
// meaning of `rttc.union()` flags, in order: | ||
@@ -116,0 +125,0 @@ // • `true` (yes these are exemplars) |
{ | ||
"name": "rttc", | ||
"version": "9.5.0", | ||
"version": "9.5.1", | ||
"description": "Runtime type-checking for JavaScript.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238739
5113