List.community

Awesome Micro npm Packages Awesome

A curated list of small, focused Node.js modules.

Inspired by the awesome68k 9k list thing.

Articles

Modules

Array

  • is-sorted5 5 - A small module to check if an Array is sorted.
  • array-first - Get the first element or first n elements of an array.
  • array-last11 4 - Return the last element in an array.
  • arr-flatten20 3 - Recursively flatten an array or arrays.
  • dedupe7 1 - Remove duplicates from an array.
  • array-range - Creates a new array with given range.
  • arr-diff15 5 - Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
  • filled-array27 2 - Returns an array filled with the specified input
  • map-array - Map object keys and values into an array.
  • in-array4 0 - Return true if any of passed values exists in array - faster than using indexOf.
  • unordered-array-remove105 6 - Efficiently remove an element from an unordered array without doing a splice.
  • array-swap - Swap position of two items in an array.
  • mirrarray1 1 - Creates a keymirror object from an array of valid keys.
  • group-array13 4 - Group array of objects into lists.

String

  • decamelize62 10 - Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow.
  • pad-left28 8 - Left pad a string with zeros or a specified string.
  • to-camel-case14 4 - Convert a string to a camel case.
  • to-capital-case - Convert a string to a capital case.
  • to-constant-case - Convert a string to a constant case.
  • to-dot-case - Convert a string to a dot case.
  • to-no-case6 4 - Remove an existing case from a string.
  • to-pascal-case - Convert a string to a pascal case.
  • to-sentence-case - Convert a string to a sentence case.
  • to-snake-case4 1 - Convert a string to a snake case.
  • to-space-case1 3 - Convert a string to a space case.
  • to-title-case4 6 - Convert a string to a title case.
  • node-slug794 81 - slugifies even utf-8 chars.
  • rtrim - Strip whitespace - or other characters - from the end of a string.
  • slice.js - Javascript library to engance String.substring / Array.slice with python slice style.
  • strip-ansi55 1 - Strip ANSI escape codes.
  • striptags173 28 - An implementation of PHP's strip_tags in Node.js.

Date & Time

  • pretty-ms262 20 - Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s.
  • hirestime3 1 - A wrapper around the built-in high resolution timer which simplifies the calculation of timestamps.
  • periods1 1 - Defined time-periods constants for Javascript, in milliseconds.
  • fecha1k 71 - Javascript Date formatting and parsing.
  • akamai-time-reference - Get reference time using Akamai's time reference service.
  • timeago.js3k 237 - A tiny(~1.7kb) library used to format date with *** time ago statement.
  • count-days-in-month - Get the number of days in a given month.
  • time-stamp26 8 - Get a formatted timestamp.
  • twas96 2 - Generate a relative time string (Example: "3 seconds ago")

Object

  • map-obj68 16 - Map object keys and values into a new object.
  • filter-obj23 2 - Filter object keys and values into a new object.
  • object-values3 2 - Get the values of an object.
  • object-pairs - Turn an object into list of [key, value] pairs for mapping, iterating or other purposes.
  • zipmap2 1 - Returns a map with the keys mapped to the corresponding vals. zipmap also accepts a single value of objects or pairs.
  • just-pluck - Pluck without the madness.
  • deep-equal213 59 - Node's assert.deepEqual() algorithm as a standalone module.
  • deep-assign241 35 - Recursive Object.assign().
  • set-value18 5 - Create nested values and any intermediaries dot notation ('a.b.c') paths.
  • get-value32 1 - Use property paths (a.b.c) to get a nested value from an object.
  • has-value9 3 - Returns true if a value exists, false if empty. Works with deeply nested values using dot notation ('a.b.c') paths.
  • has-key-deep2 4 - Deep-search objects for keys. Keys can be searched by providing an array of keys, or using a dot-notiation.
  • flatkeys2 1 - Flatten object key hierarchies into a list of strings using a custom separator.
  • flatten-obj9 3 - Converts an object literal with deeply nested nodes to a simple key/value object.
  • is-empty-object11 3 - Check if an object is empty.
  • stringify-object131 36 - Stringify an object/array like JSON.stringify just without all the double-quotes.
  • sorted-object18 2 - Returns a copy of an object with its keys sorted.
  • static-props - Defines static object attributes using Object.defineProperties
  • missing-deep-keys1 1 - Returns an array of keys from first object that are missing in second.
  • has-own-property - Check if an object has a local property.
  • merge-objects2 1 - Deep-merge two objects. Arrays that are values of the same object key get concatenated.
  • deep-object-diff27 4 - Deep diff two JavaScript Objects while preserving the data structure. Including nested structures of Arrays and Objects.

Function

  • compose-function29 3 - Compose a new function from smaller functions f(g(x)).
  • curry119 13 - A curry function without anything too clever.
  • once129 12 - Run a function exactly one time.
  • deep-bind - Bind a context to all functions in an object, including deeply nested functions.
  • identity-function6 5 - Always return the input argument.
  • mem301 14 - An optimization technique used to speed up consecutive function calls by caching the result of calls with identical input.
  • throttle-debounce85 8 - Throttle/debounce your functions.

Math

  • is-number22 8 - Returns true if the value is a number.

Stream

  • through21k 92 - Tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise.
  • through2-filter17 2 - A through2 to create an Array.prototype.filter analog for streams.
  • through2-map53 3 - A through2 to create an Array.prototype.map analog for streams.
  • stream-spigot15 1 - A readable stream generator, useful for testing or converting simple functions into Readable streams.
  • concat-stream430 47 - writable stream that concatenates strings or data and calls a callback with the result.
  • JSONStream1k 119 - streaming JSON.parse and stringify
  • through2-map-promise - A small promise-based wrapper for through2.
  • pump381 28 - pipe streams together and close all of them if one of them closes.
  • split137 13 - Break up a stream and reassemble it so that each line is a chunk.
  • is-stream74 18 - Check if something is a Node.js stream.

Promise

  • pify600 47 - Promisify a callback-style function.
  • promise-all-props6 2 - Like Promise.all but for object properties.
  • sleep-promise19 6 - Resolves a promise after a specified delay.
  • is-promise40 6 - Test whether an object looks like a promises-a+ promise.

File System

  • rimraf2k 143 - A deep deletion module for node (like rm -rf).
  • mkdirp1k 155 - Recursively mkdir, like mkdir -p.
  • du4 3 - A simple JavaScript implementation of du -sb.
  • file-size204 9 - Lightweight filesize to human-readable / proportions w/o dependencies.
  • tmp333 79 - Temporary file and directory creator for node.js.
  • fs-promise179 15 - Node fs methods as Promise/A+ (optional fs-extra, graceful-fs).

Browser

Semver

  • semver2k 230 - The semantic version parser used by npm.
  • semver-max - Find maximum (or minimum) version according to semver.
  • semver-first-satisfied - Find minimum in an array of version that satisfies a semver range.

CLI

  • abbrev102 14 - Calculate the set of unique abbreviations for a given set of strings.
  • glob4k 339 - Glob functionality for node.js.
  • username59 7 - Get the username of the current user.
  • minimist2k 168 - Parse argument options.
  • png-to-ico - Convert png to windows ico format.
  • help-version - Easily handle --help and --version arguments in your CLI application

Module management

  • pkg-conf51 7 - Get namespaced config from the closest package.json.
  • normalize-pkg4 1 - Normalize values in package.json to improve compatibility, programmatic readability and usefulness with third party libs.

Generators

  • is-generator8 3 - Check whether a given value is a generator function.

Other

  • uuid2k 93 - Generate RFC-compliant UUIDs in JavaScript.
  • node-mime1k 273 - Comprehensive MIME type mapping API based on mime-db module.
  • not-defined1 1 - Checks if foo is not defined, i.e. undefined, null, an empty string, array or object.
  • is-fqdn - Check if a string represent a fully qualified domain name.

Related lists

This section contains awesome lists that you may find useful if you use or write small NPM modules.

  • awesome-nodejs18k 3k - A curated list of delightful Node.js packages and resources.
  • awesome-npm3k 160 - Awesome npm resources and tips.

Small modules rockstars to follow

These people are used to develop awesome NPM modules that follows the single responsibility philosophy. Follow them to discover new great modules:

Sindre SorhusJames HallidayEugene SharyginIsaac Z. SchlueterJon SchlinkertDominic Tarr
Sindre SorhusJames HallidayEugene SharyginIsaac Z. SchlueterJon SchlinkertDominic Tarr
Rod VaggMax OgdenBrian Woodward
Rod VaggMax OgdenBrian Woodward

Contribute

Contributions welcome! Read the contribution guidelines first.

License

CC0

To the extent possible under law, Andrea Parodi has waived all copyright and related or neighboring rights to this work.