Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 4.4.2 to 4.4.3

18

lib/sample.js

@@ -9,2 +9,3 @@ /**

var dehydrate = require('./dehydrate');
var isEqual = require('./is-equal');

@@ -59,11 +60,14 @@

// Generate some sample values
var samples = _.reduce(_.range(n), function (memo, i) {
memo.push(generateSampleVal(dehydratedTypeSchema));
return memo;
// Generate some (unique) sample values
var samples = _.reduce(_.range(n), function (samplesSoFar, i) {
var newSample = generateSampleVal(dehydratedTypeSchema);
var isUnique = _.reduce(samplesSoFar, function checkUniqueness(isUnique, existingSample){
return isUnique && !isEqual(existingSample, newSample, typeSchema);
}, true);
if (isUnique) {
samplesSoFar.push(newSample);
}
return samplesSoFar;
}, []);
// Remove any duplicates
samples = _.uniq(samples);
// Scramble them and return.

@@ -70,0 +74,0 @@ return _.shuffle(samples);

{
"name": "rttc",
"version": "4.4.2",
"version": "4.4.3",
"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