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

rhax

v2.3.3

Published

Typescript library for simple and elegant data transformations

Downloads

947

Readme

Rhax

language codecov npm license

Rhax is a JavaScript utility library whose purpose is to make your day-to-day code perfect. It combines the best bits of functional programming with practicality, brevity and a solid type system to produce resilient, elegant code.

Getting started

To get started, head over to our docs.

Design principles

Declarative, Idiomatic & Consice

We believe JavaScript code is best written in a way that emphasizes your logic and intent.

Therefore, Rhax's utilities are designed to be declarative, idiomatic and concise. They're aimed to minimize the amount of gray code in your codebase, replacing it with easy-to-read, elegant operations that focus on your logic.

Functional Programming made practical

Rhax takes a non-traditional approach to functional programming: simplicity.

It's designed to utilize the best of FP - purity, immutability and declarative code - while keeping the paradigm's infamous problems out.

This means Rhax has no unnecessarily complex concepts, no ocean of jargon, and no surrendering your codebase to the paradigm.

For TypeScript users, by TypeScript users

One of Rhax's targets is to bring users the best typing Typescript can provide for common operations.

To this end, it uses generics and other advanced Typescript features commonly and thoroughly. It also provides wrappers for some very common native functions that have poor typing (such as Object.entries()).

And even if you're not using Typescript, chances are your IDE does - and you can still benefits from Rhax's rich typing support through its intellisense.

Other features

  • 🚀 Easy to pick up: Rhax was designed to be intuitive, and is simple to introduce into any codebase.
  • 🪶 Lightweight: A small bundle size and tree-shaking make Rhax’s footprint extremely light.
  • ⚙️ Modern: Rhax is written and built using modern JavaScript syntax and tools.
  • 🤍 Open source: Now and forever.

Why FP?

Functional programming (FP) is a progamming paradigm founded on the ideas of immutability, function purity, and others. It has become increasingly popular over the past few years, and its benefits shine in a variety of applications. Most popular modern languages (JS/TS included) have FP capabilities, and you, like most developers of those languages, are probably already using FP to some degree, perhaps without realizing it.

However, the world of FP has many deep concepts - some rooted in abstract mathematics, some shrouded in FP terminology - and "true" functional programming requires a good understanding of most of those, as well as a commitment to the paradigm that's difficult to "break out" of when needed. This combination of a steep learning curve and a binding commitment is off-putting for many developers (myself included). Rhax was created with this slice of developers in mind - it aspires to provide a simple way for Javascript developers, new and seasoned, to enjoy the benefits of FP without having to climb or move mountains.

Another point is that FP - and its concepts of declarability and function purity in particular - deal extremely well with type systems. It can make a big difference in developer experience and in quality (elegance, brevity and maintainability). This is mostly true for Typescript developers, but can also assist plain Javascript developers through the intellisense features of modern IDEs.

License

MIT