New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@weedzcokie/scheduler

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weedzcokie/scheduler - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

dist/main.d.ts

@@ -7,2 +7,3 @@ /// <reference types="node" resolution-mode="require"/>

getNextExecutionTime: () => number;
lastExecutionTime: number;
errorHandler?: (err: unknown) => unknown;

@@ -20,2 +21,3 @@ successHandler?: (result: T) => unknown;

}
export declare function allTasks(): IterableIterator<Task<unknown>>;
export declare function schedule(name: string, fn: () => number, period?: Task["getNextExecutionTime"], opts?: ScheduleOpts): void;

@@ -22,0 +24,0 @@ export declare function stopTask(name: string): boolean;

@@ -19,2 +19,3 @@ export const msInHour = 3600000;

async function runTask(task) {
task.lastExecutionTime = Date.now();
try {

@@ -33,2 +34,5 @@ const result = await task.fn();

const tasks = new Map();
export function allTasks() {
return tasks.values();
}
export function schedule(name, fn, period = () => 1000, opts = {}) {

@@ -40,2 +44,3 @@ const task = {

getNextExecutionTime: period,
lastExecutionTime: 0,
errorHandler: opts.errorHandler,

@@ -42,0 +47,0 @@ successHandler: opts.successHandler,

2

package.json
{
"name": "@weedzcokie/scheduler",
"version": "1.0.7",
"version": "1.0.8",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

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