Socket
Socket
Sign inDemoInstall

rttc

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rttc - npm Package Compare versions

Comparing version 9.5.0 to 9.5.1

13

lib/coerce-exemplar.js

@@ -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)

2

package.json
{
"name": "rttc",
"version": "9.5.0",
"version": "9.5.1",
"description": "Runtime type-checking for JavaScript.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc