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

@yurkimus/curry

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yurkimus/curry - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json

@@ -6,3 +6,3 @@ {

"version": "0.1.0",
"version": "0.1.1",
"author": "yurkimus <yurkimus@gmail.com>",

@@ -9,0 +9,0 @@

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

export let curry: (predicate: Function, length: Function['length']) => Function
type Unary<F extends (p0: any) => any, P extends Parameters<F>, R = ReturnType<F>> = (p0: P[0]) => R
type Binary<F extends (p0: any, p1: any) => any, P extends Parameters<F>, R = ReturnType<F>> = {
(p0: P[0]): (p1: P[1]) => R
(p0: P[0], p1: P[1]): R
}
type BinaryCropped<F extends (p0: any, p1: any) => any, P extends Parameters<F>, R = ReturnType<F>> = {
(p0: P[0], p1: P[1]): R
}
type Ternary<F extends (p0: any, p1: any, p2: any) => any, P extends Parameters<F>, R = ReturnType<F>> = {
(p0: P[0]): {
(p1: P[1]): (p2: P[2]) => R
(p1: P[1], p2: P[2]): R
}
(p0: P[0], p1: P[1]): (p2: P[2]) => R
(p0: P[0], p1: P[1], p2: P[2]): R
}
type TernaryCropped<F extends (p0: any, p1: any, p2: any) => any, P extends Parameters<F>, R = ReturnType<F>> = {
(p0: P[0]): (p1: P[1], p2: P[2]) => R
(p0: P[0], p1: P[1], p2: P[2]): R
}
export let curry: {
<Predicate extends (p0: any, p1: any, p2: any) => any>(
predicate: Predicate,
length: 3,
): Ternary<Predicate, Parameters<Predicate>>
<Predicate extends (p0: any, p1: any) => any>(
predicate: Predicate,
length: 2,
): Binary<Predicate, Parameters<Predicate>>
<Predicate extends (p0: any, p1: any, p2: any) => any>(
predicate: Predicate,
length: 2,
): TernaryCropped<Predicate, Parameters<Predicate>>
<Predicate extends (p0: any, p1: any) => any>(
predicate: Predicate,
length: 1,
): BinaryCropped<Predicate, Parameters<Predicate>>
<Predicate extends (p0: any) => any>(
predicate: Predicate,
length: 1,
): Unary<Predicate, Parameters<Predicate>>
}
/**
* Returns a curried version of a function.
*
* @type {typeof import('./index.d.ts').curry}
*
* @param {Function} predicate

@@ -5,0 +7,0 @@ * @param {number} length

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