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 🙏

© 2024 – Pkg Stats / Ryan Hefner

stdlm

v0.5.0

Published

Lambdant standard library.

Downloads

5

Readme

stdlm

Lambdant standard library.

Get

$ yarn add stdlm

Using

@std = require 'stdlm';

Test

$ yarn test

Library

Numeric

add

Number -> Number -> Number adds two Numbers

sub

Number -> Number -> Number subtracts two Numbers

mul

Number -> Number -> Number multiplies two Numbers

div

Number -> Number -> Number divides two Numbers

Logic

not

Boolean -> Boolean computes logical NOT

or

Boolean -> Boolean -> Boolean computes logical OR

and

Boolean -> Boolean -> Boolean computes logical AND

bnot

Number -> Number computes bitwise NOT

bor

Number -> Number computes bitwise OR

band

Number -> Number computes bitwise AND

mod

Number -> Number -> Number computes modulus

lsh

Number -> Number -> Number computes left shift

rsh

Number -> Number -> Number computes right shift

Equality

is

a -> b -> Boolean determines reference or strict primitive equality (basic, least expensive)

similar

a -> b -> Boolean determines basic or Date/NaN/RegExp equality (similar)

eq

a -> b -> Boolean determines similar or recursive Object/Array equality (deep, most expensive)

xor

a -> b -> Number computes bitwise XOR

List

map

(a -> b) -> [a] -> [b] maps a function over an array

filter

(a -> Boolean) -> [a] -> [a] filters an array by predicate

foldl

(a -> b) -> a -> [b] -> [a] reduce from the left with a function and an initial value over an array

foldr

(a -> b) -> a -> [b] -> [a] reduce from the right with a function and an initial value over an array

foldl1

(a -> a) -> [a] -> [a] reduce from the left with a function over an array, starting with the leftmost value

foldr1

(a -> a) -> [a] -> [a] reduce from the right with a function over an array, starting with the rightmost value

sum

(Appendable a) => [a] -> a takes the sum of all Appendables in the array

product

Number a => [a] -> a takes the product of all Numbers in the array

I/O

log

{ IO } a -> a prints the argument and returns it

Combinator

id

a => a I-combinator. returns the argument

call

(a -> b) -> a -> b A-combinator. calls the first argument with the second

compose

(b -> c) -> (a -> b) -> (a -> c) B-combinator. composes two functions

constant

a -> b -> a K-combinator. thunkifies the first argument

flip

(b -> a -> c) -> (a -> b -> c) C-combinator. swaps the first two arguments

seq

(a -> b -> c) -> (a -> b) -> a -> c S-combinator. creates an applicative sequence

join

(a -> a -> b) -> a -> b W-combinator. calls the first argument with the second argument twice

on

(b -> b -> c) -> (a -> b) -> a -> c Psi-combinator. composes the first function over the second function for two arguments

Currying

curry2

((a, b) -> c) -> a -> b -> c curries a function for two arguments
...

curry5

((a, b, c, d, e) -> f) -> a -> b -> c -> d -> e -> f curries a function for five arguments

uncurry2

(a -> b -> c) -> (a, b) -> c uncurries a function for two arguments
...

uncurry5

(a -> b -> c -> d -> e -> f) -> (a, b, c, d, e) -> f curries a function for five arguments

Other

create

(Constructor From a To c) => a -> [b] -> c instantiates the first argument with the second argument as the parameters