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

@psxcode/arity

v0.1.1

Published

Functional helpers, with Typescript type propagation

Downloads

10

Readme

Arity

Functional helpers, with Typescript type propagation

Install

npm install @psxcode/arity

nullary

import { nullary } from '@psxcode/arity'

const f: (p0: number, p1: string) => boolean

typeof nullary(f)  // () => boolean

unary

import { unary } from '@psxcode/arity'

const f: (p0: number, p1: string) => boolean

typeof unary(f)  // (p0: number) => boolean

binary

import { binary } from '@psxcode/arity'

const f: (p0: number, p1: string, p2: number) => boolean

typeof binary(f)  // (p0: number, p1: string) => boolean

ternary

import { ternary } from '@psxcode/arity'

const f: (p0: number, p1: string, p2: number, p3: string) => boolean

typeof ternary(f)  // (p0: number, p1: string, p2: number) => boolean

voidify

import { voidify } from '@psxcode/arity'

const f: (p0: number, p1: string) => boolean

typeof voidify(f)  // (p0: number, p1: string) => void

bind

import { bind } from '@psxcode/arity'

const f: (p0: number, p1: string, p2: boolean) => boolean

typeof bind(10)(f)  // (p0: string, p1: boolean) => boolean

typeof bind(10, 'str')(f)  // (p1: boolean) => boolean

typeof bind(10, 'str', true)(f)  // () => boolean

bindCtx

import { bindCtx } from '@psxcode/arity'

const ctx: { [k: string]: any }
const f: (this: typeof ctx, p0: number) => boolean

typeof bindCtx(ctx)(f)  // (p0: number) => boolean

bindProps

import { bindProps } from '@psxcode/arity'

const props: {
  a: number,
  b: string
}
const f: (p: typeof props) => boolean

typeof bindProps({ a: 10 })(f)  // (p: { b: string }) => boolean

curry

import { curry } from '@psxcode/arity'

const f: (a: number, b: string) => boolean

typeof curry(f)  // (a: number) => (b: string) => boolean

gather

import { gather } from '@psxcode/arity'

const f: (p: [number, string, boolean]) => boolean

typeof gather(f)  // (p0: number, p1: string, p2: boolean) => boolean

spread

import { spread } from '@psxcode/arity'

const f: (a: number, b: string, c: boolean) => boolean

typeof spread(f)  // (args: [number, string, boolean]) => boolean

branch

import { branch } from '@psxcode/arity'

const f0: (a: number) => string
const f1: (a: number) => number
const pred = (a: number) => true

typeof branch(pred, f0)  // (a: number) => string | undefined

typeof branch(pred, f0, f1)  // (a: number) => string | number

and

import { and } from '@psxcode/arity'

const f0: (a: number) => boolean
const f1: (a: number) => boolean

typeof and(f0, f1)  // (a: number) => boolean

or

import { or } from '@psxcode/arity'

const f0: (a: number) => boolean
const f1: (a: number) => boolean

typeof or(f0, f1)  // (a: number) => boolean

noop

import { noop } from '@psxcode/arity'

typeof noop  // () => void

identity

import { identity } from '@psxcode/arity'

typeof identity  // <T> (a: T) => T

identityAsync

import { identityAsync } from '@psxcode/arity'

typeof identityAsync  // <T> (a: T) => Promise<T>

constant

import { constant } from '@psxcode/arity'

typeof constant  // <T> (a: T) => () => T

constantAsync

import { constantAsync } from '@psxcode/arity'

typeof constantAsync  // <T> (a: T) => () => Promise<T>