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

javascript-core-utils-made-fp

v1.2.0

Published

A bunch of core javascript utilities made functional.

Readme

javascript-core-utils-made-fp

This package has 0 external dependencies. It's literally as simple as it gets.

I made it because after looking at the source code of Ramda and other packages the hair at the back of my neck decided to stand up, walk to the nearest corner and cry itself to death.

Not sure why they can't just write a normal function for anything and keep wrapping everything in 1, 2 or more functions.

Also this package prefers arrow functions over function keyword for brevity.

There is no implicit currying anywhere. Most (?) functions have up to 4 versions (see example below).

There is no hidden or changed behavior anywhere. This package is just an extremely thin and functional 'proxy' layer over the core utils available in javascript like Maps, strings, numbers etc.

The only thing I changed is I gave some functions better (in my opinion, obviously) names. That's it.

The source code is very simple and easy to understand.

Have a look at it yourself.

Implemented functionality so far

So far there is (some) functionality for:

  • arrays (loop/foreach, every, some, filter, reduce, at, etc)
  • boolean logic (and, or, not, etc)
  • functions (pipe, identity, always, memoize, etc)
  • json (read, write, read_safe, etc)
  • maps (get, set, has, etc)
  • objects (create, keys, values, etc)
  • numbers (plus, minus, power, comparisons, etc)
  • promises (then, then_catch)
  • sets (add, has, etc)
  • strings (upper, lower, ends_with, index_of, etc)

Sample/preview of the source code

Example from array.js:

export const includes = (string, substring, start) => string.includes(substring, start);
export const includes$ = string => (substring, start) => includes(string, substring, start);
export const includes_by = (substring, start, string) => includes(string, substring, start);
export const includes_by$ = (substring, start) => string => includes(string, substring, start);
  1. In this case the base name includes is a function that takes the data being operated on + the remaining arguments.
  2. The $ sign signifies partial application or currying.
  3. The _by postfix signifies that we pass the remaining arguments first and the actual data last;

This way every scenario is covered. Most of these functions will probably never get used, but at the moment of writing this README I'm not sure which versions will be used the most so I'm adding all combinations for now.

The includes_by variation is probably the least interesting, but it's there in case someone wants it for some reason xd.

This entire package operates with these 3 rules in mind.

Why is the package name soo looooonggggggguh

Since I gave this package a rather lengthy name, here's a link to StackOverflow describing how you can give it a shorter alias of your choosing.

In case you're lazy here's the excerpt:

npm i myalias@npm:javascript-core-utils-made-fp

npm i myalias-1.1.0@npm:[email protected]

Or edit package.json:

"dependencies": {
  "javascript-core-utils-made-fp": "npm:[email protected]",
  "myalias": "npm:[email protected]"
}

And then in your code:

const fp = require('myalias');

I'm feeling lazy at the moment of writing this, so I haven't checked these (yet) myself, I just copied them over from stack overflow.

I'm a curious person tho so I'll probably verify it at some point (soon) : }