npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strong-curry

v1.0.1

Published

`strong-curry` is a tiny package built on the top of `just-curry-it` that provides a strongly-typed implementation of function currying.

Readme

strong-curry ⚡🍛

strong-curry is a tiny package built on the top of just-curry-it that provides a strongly-typed implementation of function currying.

The whole implementation included in this package comes from the just-curry-it; this project only aims to provide precise typings for the currying process.

Installation

You can install the strong-curry package using npm:

$ npm i strong-curry --save

Alternatively, you can also use yarn:

$ yarn add strong-curry

Examples

Basic usage

import { curry } from "strong-curry";

const multiplyBy = curry((a: number, b: number) => a * b);

const double = multiplyBy(2);
const quadruple = multiplyBy(4);

double(5); // 10
quadruple(3); // 12

Variadic functions

Functions that take a variable number of arguments require an explicitly stated arity when currying; failing to do so will leave the function uncurried:

import { curry } from "strong-curry";

const sum = (...values: Array<number>) => values.reduce((acc, val) => acc + val, 0);

const sumOf3 = curry(sum, 3);
sumOf3(1, 2, 3); // 6
sumOf3(1)(2, 3); // 6
sumOf3(1, 2)(3); // 6
sumOf3(1)(2)(3); // 6

curry(sum)(1, 2, 3); // 6
curry(sum)(1, 2)(3); // TS2349: This expression is not callable. [...]

Curried<F, N> type

Curried<F, N> type represents a curried function and is effectively a return type of the curry function.

Because Curried<F, N> type is idempotent, i.e., Curried<F, N> ≡ Curried<Curried<F, N>, N>, you can mindlessly use it as a function parameter without worrying about it being applied multiple times:

import { curry, Curried } from "strong-curry";

type BinaryOperator = (a: number, b: number) => number;
const add = curry<BinaryOperator>((a, b) => a + b);

// Some arbitrary function
const compute = (func: Curried<BinaryOperator>): number => func(func(2, 4))(6);

console.log(compute(add)); // OK
console.log(compute(curry(add))); // OK
console.log(compute(curry(curry(add)))); // OK

Limitations

Like many complex generic-based typings, this package works by defining multiple overloads to provide the strongly-typed currying. Because of that, there is a maximum of supported parameters (namely 10). Providing a function with 11 or more parameters will yield the type of the uncurried version.