uinix-fp-k
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

uinix-fp-k

Build Coverage Downloads Size

uinix-fp constant/always utility.


Install

This package is ESM-only and requires Node 12+.

npm install uinix-fp-k

Use

k is a curried function always returning the first provided value.

import {k} from 'uinix-fp-k';

k(42)(9000); // 42

const alwaysTrue = k(true);

alwaysTrue(false); // true
[1, 2, 3].map(alwaysTrue); // [true, true, true];

API

This package exports the following identifiers: k. There is no default export.

k(x)(y)

Parameters (Curried)
  • x (X) — Provided value
  • y (Y) — Second provided value (unused)
Returns
  • X — Always returns x

License

MIT © Chris Zhou

Readme

Keywords

Package Sidebar

Install

npm i uinix-fp-k

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

2.69 kB

Total Files

4

Last publish

Collaborators

  • chrisrzhou