Socket
Socket
Sign inDemoInstall

uuid-cron

Package Overview
Dependencies
69
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "uuid-cron",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

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

@@ -13,3 +13,7 @@ const { v4: uuidv4 } = require('uuid');

let initialized = false;
let initializedLimited = false;
/**

@@ -20,8 +24,9 @@ * Starting cron job according your configuration

* @param numOfRandomsInTime - amount of random uuids for each cron job
* if null, it returns the same uuid during the cron
*/
function init(humanCron, numOfRandomsInTime) {
initialized = true;
const cronTime = humanToCron(humanCron);
uuidv4Value = uuidv4();
if (!numOfRandomsInTime) {
if (!numOfRandomsInTime || typeof numOfRandomsInTime != 'number') {
initialized = true;
job = new CronJob(cronTime, (() => {

@@ -31,2 +36,3 @@ uuidv4Value = uuidv4();

} else {
initializedLimited= true;
numOfRandomsInTimeP = numOfRandomsInTime;

@@ -49,3 +55,3 @@ randomUsers = computeJobWithLimitedRandoms(cronTime, numOfRandomsInTime);

function uuidv4CronLimited() {
if (!initialized) {
if (!initializedLimited) {
return initError();

@@ -52,0 +58,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc