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

@typed/lambda

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typed/lambda - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

cjs/apply.d.ts

@@ -9,4 +9,4 @@ import { Apply, Fn } from './types';

<Args extends any[], T extends Fn<any[], any>>(args: Args, fn: T): Apply<Args, T>;
<Args extends any[]>(args: Args): <T extends Fn<Args, any>>(fn: T) => Apply<Args, T>;
<Args_1 extends any[]>(args: Args_1): <T_1 extends Fn<Args_1, any>>(fn: T_1) => Apply<Args_1, T_1>;
};
//# sourceMappingURL=apply.d.ts.map

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

import { ArgsOf, Fn } from './types';
import { Fn } from './types';
/**

@@ -6,3 +6,3 @@ * Memoize a function

*/
export declare const memoize: <F extends Fn<any[], any>>(f: F) => (...args: ArgsOf<F>) => ReturnType<F>;
export declare const memoize: <F extends Fn<any[], any>>(f: F) => F;
//# sourceMappingURL=memoize.d.ts.map

@@ -10,3 +10,3 @@ "use strict";

const cache = new Map();
return (...args) => {
return ((...args) => {
const key = args.reduce((x, y) => x + common_1.toString(y), '');

@@ -22,4 +22,4 @@ if (cache.has(key)) {

return result;
};
});
};
//# sourceMappingURL=memoize.js.map

@@ -10,4 +10,4 @@ import { Arity1, Fn } from './types';

<A, Args extends any[]>(withFn: Arity1<A, any>, fn: Fn<Args, A>): Fn<Args, A>;
<A>(withFn: Arity1<A, any>): <Args extends any[]>(fn: Fn<Args, A>) => Fn<Args, A>;
<A_1>(withFn: Arity1<A_1, any>): <Args_1 extends any[]>(fn: Fn<Args_1, A_1>) => Fn<Args_1, A_1>;
};
//# sourceMappingURL=withPrevious.d.ts.map

@@ -9,4 +9,4 @@ import { Apply, Fn } from './types';

<Args extends any[], T extends Fn<any[], any>>(args: Args, fn: T): Apply<Args, T>;
<Args extends any[]>(args: Args): <T extends Fn<Args, any>>(fn: T) => Apply<Args, T>;
<Args_1 extends any[]>(args: Args_1): <T_1 extends Fn<Args_1, any>>(fn: T_1) => Apply<Args_1, T_1>;
};
//# sourceMappingURL=apply.d.ts.map

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

import { ArgsOf, Fn } from './types';
import { Fn } from './types';
/**

@@ -6,3 +6,3 @@ * Memoize a function

*/
export declare const memoize: <F extends Fn<any[], any>>(f: F) => (...args: ArgsOf<F>) => ReturnType<F>;
export declare const memoize: <F extends Fn<any[], any>>(f: F) => F;
//# sourceMappingURL=memoize.d.ts.map

@@ -8,3 +8,3 @@ import { toString } from '@typed/common';

const cache = new Map();
return (...args) => {
return ((...args) => {
const key = args.reduce((x, y) => x + toString(y), '');

@@ -20,4 +20,4 @@ if (cache.has(key)) {

return result;
};
});
};
//# sourceMappingURL=memoize.js.map

@@ -10,4 +10,4 @@ import { Arity1, Fn } from './types';

<A, Args extends any[]>(withFn: Arity1<A, any>, fn: Fn<Args, A>): Fn<Args, A>;
<A>(withFn: Arity1<A, any>): <Args extends any[]>(fn: Fn<Args, A>) => Fn<Args, A>;
<A_1>(withFn: Arity1<A_1, any>): <Args_1 extends any[]>(fn: Fn<Args_1, A_1>) => Fn<Args_1, A_1>;
};
//# sourceMappingURL=withPrevious.d.ts.map
{
"name": "@typed/lambda",
"version": "1.0.4",
"version": "1.0.5",
"description": "Helpful functions for working in a functional style",

@@ -38,4 +38,4 @@ "main": "./cjs/index.js",

"sideEffects": false,
"gitHead": "4707f131e18502c2983f9ca66b74b0e9da48fc6d",
"gitHead": "1182d7f246d79718d84a58f75a2d9e7e129875b8",
"unpkg": "./umd/index.js"
}

@@ -8,6 +8,6 @@ import { toString } from '@typed/common'

*/
export const memoize = <F extends Fn>(f: F) => {
export const memoize = <F extends Fn>(f: F): F => {
const cache = new Map<any, any>()
return (...args: ArgsOf<F>): ReturnType<F> => {
return ((...args: ArgsOf<F>): ReturnType<F> => {
const key = args.reduce((x, y) => x + toString(y), '')

@@ -28,3 +28,3 @@

return result
}
}) as F
}

@@ -9,4 +9,4 @@ import { Apply, Fn } from './types';

<Args extends any[], T extends Fn<any[], any>>(args: Args, fn: T): Apply<Args, T>;
<Args extends any[]>(args: Args): <T extends Fn<Args, any>>(fn: T) => Apply<Args, T>;
<Args_1 extends any[]>(args: Args_1): <T_1 extends Fn<Args_1, any>>(fn: T_1) => Apply<Args_1, T_1>;
};
//# sourceMappingURL=apply.d.ts.map

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

import { ArgsOf, Fn } from './types';
import { Fn } from './types';
/**

@@ -6,3 +6,3 @@ * Memoize a function

*/
export declare const memoize: <F extends Fn<any[], any>>(f: F) => (...args: ArgsOf<F>) => ReturnType<F>;
export declare const memoize: <F extends Fn<any[], any>>(f: F) => F;
//# sourceMappingURL=memoize.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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