Useful JavaScript Libraries
Knex
For databases
All you need and nothing you don’t for getting data into and out of a database. Everything it does is obvious if you know SQL.
moment.js
For dates and times
One of the nicest APIs I’ve ever used for working with dates and times. It’s fairly heavy and not actively developed (it could be considered finished). For size, day.js has a similar API in a smaller package which is better for use in the browser. I still use moment in Node.
chroma.js
For colors
I would describe it as moment.js for colors. Parse a color, do anything you want to it (darken, lighten, saturate, generate color schemes, etc.), and output into any format you could possibly need.
@sindresorhus/is
For runtime type checking
An extremely straightforward library for type checking anything. Supports TypeScript, and includes assertions, because often the best thing to do when your types aren’t what you expect is to crash so you can figure out why.
Also see literally anything by sindresorhus for more useful libraries.
debug
For debug logging
Sprinkle debug messages throughout your Node app that will only print when you run with a DEBUG
environment variable present. A better alternative to commenting out your console.log
s when you don’t want to see them.
anime
For animation
A really simple library for how complex animation can get. Flexible but easy to understand, which I’d say has something to do with its fantastic documentation and examples.