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-20231011122331-29dc712 to 1.13.0-alpha-20231011122715-7677af5

25

cjs/index.js

@@ -189,30 +189,11 @@ "use strict";

function delay(fn, delay) {
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, delay };
return wrapped;
return assignOptions(fn, { delay });
}
exports.delay = delay;
function addMetadata(fn, metadata) {
const gatheredMetadata = { ...fn.__execOptions?.metadata, ...metadata };
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, metadata: gatheredMetadata };
return wrapped;
return assignOptions(fn, { metadata });
}
exports.addMetadata = addMetadata;
function discardAfter(fn, value) {
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, discardAfter: value };
return wrapped;
return assignOptions(fn, { discardAfter: value });
}

@@ -219,0 +200,0 @@ exports.discardAfter = discardAfter;

2

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

@@ -158,28 +158,9 @@ import parseDuration from "parse-duration";

export function delay(fn, delay) {
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, delay };
return wrapped;
return assignOptions(fn, { delay });
}
export function addMetadata(fn, metadata) {
const gatheredMetadata = { ...fn.__execOptions?.metadata, ...metadata };
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, metadata: gatheredMetadata };
return wrapped;
return assignOptions(fn, { metadata });
}
export function discardAfter(fn, value) {
const wrapped = async function (...args) {
return enqueue(wrapped, ...args);
};
wrapped.__fn = fn.__fn;
wrapped.__metadata = fn.__metadata;
wrapped.__execOptions = { ...fn.__execOptions, discardAfter: value };
return wrapped;
return assignOptions(fn, { discardAfter: value });
}

@@ -186,0 +167,0 @@ export function assignOptions(fn, options) {

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

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

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

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

declare const _default: "1.13.0-alpha-20231011122331-29dc712";
declare const _default: "1.13.0-alpha-20231011122715-7677af5";
export default _default;

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