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

@jayarjo/scheduler

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jayarjo/scheduler - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lib/index.d.ts

8

lib/Task.js

@@ -30,3 +30,3 @@ import { guid, isPromise } from './Utils';

onSuccess: () => { },
onFailure: () => { }
onFailure: () => { },
};

@@ -70,8 +70,8 @@ this.schema = Object.assign({}, defaults, typeof arg === 'function' ? { fn: arg } : arg);

run() {
const { fn, args = [], onSuccess, onFailure, repeatTimesBeforeFail } = this.schema;
const { fn, args = [], onSuccess, onFailure, repeatTimesBeforeFail, } = this.schema;
if (this._state !== TaskState.IDLE) {
return Promise.reject(new Error(`task ${this.uid} is either already ${this.state}!`));
}
const handleCompletion = isOk => {
return result => {
const handleCompletion = (isOk) => {
return (result) => {
if (isOk) {

@@ -78,0 +78,0 @@ if (this.isOneTime) {

@@ -13,7 +13,2 @@ export const isIterable = obj => obj && typeof obj[Symbol.iterator] === 'function';

})();
export const invariant = (expr, errMsg) => {
if (expr) {
throw new Error(errMsg);
}
};
export const isPromise = obj => obj && typeof obj.then === 'function';

@@ -20,0 +15,0 @@ export const random = (min, max) => {

{
"name": "@jayarjo/scheduler",
"version": "1.1.0",
"version": "1.1.1",
"description": "Schedule a task to execute after some period, regularly with a given interval, just given amount of times, or simply until it succeeds.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [

@@ -7,0 +8,0 @@ "lib/"

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