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

deleight

Package Overview
Dependencies
Maintainers
0
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deleight - npm Package Compare versions

Comparing version

to
5.5.8

2

dist/cjs/function/reversible/reversible.d.ts

@@ -22,3 +22,3 @@ /**

*/
export declare function reversible(action: Function, reverseAction: Function): (arg: any) => any;
export declare function reversible(action: Function, reverseAction: Function, lateReverse?: boolean): (arg: any) => any;
/**

@@ -25,0 +25,0 @@ * Alias for {@link reversible}

@@ -25,10 +25,16 @@ "use strict";

*/
function reversible(action, reverseAction) {
function reversible(action, reverseAction, lateReverse) {
let lastArg;
return function (arg) {
if (lastArg)
if (lastArg === arg) {
reverseAction.call(this, lastArg);
const result = action.call(this, arg);
lastArg = arg;
return result;
lastArg = null;
}
else {
if (lastArg)
reverseAction.call(this, lastArg);
const result = action.call(this, arg);
lastArg = arg;
return result;
}
};

@@ -35,0 +41,0 @@ }

@@ -22,3 +22,3 @@ /**

*/
export declare function reversible(action: Function, reverseAction: Function): (arg: any) => any;
export declare function reversible(action: Function, reverseAction: Function, lateReverse?: boolean): (arg: any) => any;
/**

@@ -25,0 +25,0 @@ * Alias for {@link reversible}

@@ -22,10 +22,16 @@ /**

*/
export function reversible(action, reverseAction) {
export function reversible(action, reverseAction, lateReverse) {
let lastArg;
return function (arg) {
if (lastArg)
if (lastArg === arg) {
reverseAction.call(this, lastArg);
const result = action.call(this, arg);
lastArg = arg;
return result;
lastArg = null;
}
else {
if (lastArg)
reverseAction.call(this, lastArg);
const result = action.call(this, arg);
lastArg = arg;
return result;
}
};

@@ -32,0 +38,0 @@ }

{
"name": "deleight",
"version": "5.5.7",
"version": "5.5.8",
"description": "A library with 9 modules for writing more expressive web applications with traditional HTML, CSS and JavaScript.",

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