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

@defer/client

Package Overview
Dependencies
Maintainers
2
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@defer/client - npm Package Compare versions

Comparing version 1.13.0-alpha-20231011122715-7677af5 to 1.13.0-alpha-20231011131946-a7974f8

21

cjs/index.js

@@ -188,2 +188,9 @@ "use strict";

};
/**
* Delay an execution
* @param fn Duration
* @param delay Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
function delay(fn, delay) {

@@ -193,2 +200,9 @@ return assignOptions(fn, { delay });

exports.delay = delay;
/**
* Add metadata to an execution
* @param fn Duration
* @param metadata Object
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
function addMetadata(fn, metadata) {

@@ -198,2 +212,9 @@ return assignOptions(fn, { metadata });

exports.addMetadata = addMetadata;
/**
* Discard an execution if not started after a given interval
* @param fn Duration
* @param value Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
function discardAfter(fn, value) {

@@ -200,0 +221,0 @@ return assignOptions(fn, { discardAfter: value });

2

cjs/version.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "1.13.0-alpha-20231011122715-7677af5";
exports.default = "1.13.0-alpha-20231011131946-a7974f8";

@@ -157,8 +157,29 @@ import parseDuration from "parse-duration";

};
/**
* Delay an execution
* @param fn Duration
* @param delay Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export function delay(fn, delay) {
return assignOptions(fn, { delay });
}
/**
* Add metadata to an execution
* @param fn Duration
* @param metadata Object
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export function addMetadata(fn, metadata) {
return assignOptions(fn, { metadata });
}
/**
* Discard an execution if not started after a given interval
* @param fn Duration
* @param value Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export function discardAfter(fn, value) {

@@ -165,0 +186,0 @@ return assignOptions(fn, { discardAfter: value });

@@ -1,1 +0,1 @@

export default "1.13.0-alpha-20231011122715-7677af5";
export default "1.13.0-alpha-20231011131946-a7974f8";
{
"name": "@defer/client",
"version": "1.13.0-alpha-20231011122715-7677af5",
"version": "1.13.0-alpha-20231011131946-a7974f8",
"description": "Zero infrastructure NodeJS background jobs",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -62,4 +62,25 @@ import { Units } from "parse-duration";

}
/**
* Delay an execution
* @param fn Duration
* @param delay Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export declare function delay<F extends DeferableFunction>(fn: DeferredFunction<F>, delay: Duration | Date): DeferredFunction<F>;
/**
* Add metadata to an execution
* @param fn Duration
* @param metadata Object
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export declare function addMetadata<F extends DeferableFunction>(fn: DeferredFunction<F>, metadata: ExecutionMetadata): DeferredFunction<F>;
/**
* Discard an execution if not started after a given interval
* @param fn Duration
* @param value Duration | Date
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options)
* @returns
*/
export declare function discardAfter<F extends DeferableFunction>(fn: DeferredFunction<F>, value: Duration | Date): DeferredFunction<F>;

@@ -66,0 +87,0 @@ export declare function assignOptions<F extends DeferableFunction>(fn: DeferredFunction<F>, options: ExecutionOptions): DeferredFunction<F>;

@@ -1,2 +0,2 @@

declare const _default: "1.13.0-alpha-20231011122715-7677af5";
declare const _default: "1.13.0-alpha-20231011131946-a7974f8";
export default _default;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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