What are your basic meta-modules?

When programming in any established language, developers already know the fortes and pitfalls of the language, hence try to compensate by adding meta libraries and modules.

Meta modules are pieces of code which complement the std library or the language itself by adding features which are very useful, but just not present. They do not serve an application-specific purpose.

I have caught myself quite often adding such bundles in different languages, however I was always glad I did. For me those are the libraries, modules and packages I usually add before starting to write the logic. What are your meta-packages?

Browser JS

  • Core.JS, because it does a good job at polyfilling the stuff I need

Node.JS

  • rustify-js (which bundles and enhances result-js and roption-js; more to come) as of lately, because I am starting to love Rust and FP (stable software, better error management) :D
  • promise-defer, because I hate handler-hell ;P
  • VError, since it gives me a container for lots of information for a better error management

C++

  • Boost, just WOW, it makes life so easy!

Rust

  • slog, easily create beautiful logs!
Kleo Petrov's photo

That's a really great question. So, if we talk about meta modules as a modules that adds missing features to an established language, I simply can't miss Lodash.

Lodash doesn't need introduction. The library is packed with tons of helper functions, currently missing from the ECMAScript Spec or extending the native ones. I hardly imagine a project that won't benefit from it.

Ramda is another example of a library worth mentioning. It's a library aimed at providing functional programming style in JavaScript, just how we need it.

For some time now, I've been using pretty-error for logging Node.js errors. It's a small tool for showing errors with less clutter. Just look at it:

Marco Alka's photo

woooow, I need that pretty error lib so badly :D

Lars's photo

In every Node.JS project I use bunyan for logging

j's photo

I write a lot of meta abstractions myself, because ... I'm lazy :). But there is no standard pkg/lib I use anymore usually I add things to a project and extract them as libraries if I need them again.

Often they are framework specific traits like "ApplicationLogTrait" or something. nothing fancy. just a getter for my logging which I fetch from a registry pattern or a parser / transformers such tedious "match that, turn it into" things like "camelCase to snake_case to kebab-case" or "create a cache proxy for class XYZ".

But as I mentioned I write a lot of this stuff myself and just throw it into the pkg managers not carrying if anyone else uses it ;D ....

Marco Alka's photo

Well, not caring about others is one thing, but making a clean module out of it is still quite important. It's at least one piece of your application, which is battle-tested!

j's photo

Marco Alka yes, but I should give better descriptions than "read the unitests for instruction" ;D ...