Your first time on this page? Allow me to give some explanations.
Awesome Micro npm Packages
A curated list of small, focused npm packages.
Here you can see meta information about this topic like the time we last updated this page, the original creator of the awesome list and a link to the original GitHub repository.
Thank you parro-it & contributors
View Topic on GitHub:
parro-it/awesome-micro-npm-packages
Search for resources by name or description.
Simply type in what you are looking for and the results will be filtered on the fly.
Further filter the resources on this page by type (repository/other resource), number of stars on GitHub and time of last commit in months.
Awesome Micro npm Packages
😎 Awesome lists about all kinds of interesting topics
Articles
[[I'm slow at replying these days, but I hope to get back to answering questions eventually]] Ask me anything!
some best practices for JS modules
Array
A small module to check if an Array is sorted
Get the first element or first n elements of an array.
Return the last element in an array. Faster than .slice
Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
easy deduplication of array values
creates a new array with given range
Returns an array with only the unique values from all given arrays using strict equality for comparisons.
Returns an array filled with the specified input
Map object keys and values into an array.
Return true if a value exists in an array. Faster than using indexOf and won't blow up on null values.
Efficiently remove an element from an unordered array without doing a splice
Swaps the index / position of an array
NPM module for creating a keymirror object from an array of strings
Group array of objects into lists.
Split array/TypedArray to chunks of given size
String
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
Left pad a string with zeros or a specified string. Fastest implementation.
Convert a string to a camel case.
Convert a string to a capital case.
Convert a string to a constant case.
Convert a string to a dot case.
Remove an existing case from a string.
Convert a string to pascal case.
Convert a string to a sentence case.
Convert a string to a snake case.
Convert a string to a space case.
Convert a string to a title case.
slugifies even utf-8 chars!
Strip whitespace - or other characters - from the end of a string
nano library to enhance String.substring / Array.slice with python slice style by Proxy.
Strip ANSI escape codes from a string
An implementation of PHP's strip_tags in Typescript.
Parse next JSON value from string allowing extraneous characters after value
Created with CodeSandbox
Date & Time
Convert milliseconds to a human readable string: 1337000000
→ 15d 11h 23m 20s
thin wrapper around process.hrtime
Lightweight and simple JS date formatting and parsing
Get a time reference using Akamai's time reference service
timeago.js is a tiny(2.0 kb) library used to format date with *** time ago
statement.
Get the number of days in a given month
Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
Object
Map object keys and values into a new object
Filter object keys and values into a new object
Get the values of an object
Object -> [[key0, value0], [key1, value1]...]
Returns a map with the keys mapped to the corresponding vals.
pluck without the madness
node's assert.deepEqual algorithm
[DEPRECATED] Recursive Object.assign()
Set nested properties on an object using dot-notation.
Use property paths (a.b.c
) get a nested value from an object.
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Deep-search objects for keys in JavaScript objects. Keys can be searched by providing an array of keys, or using a dot-notiation.
Flatten object keys
Converts an object literal with deeply nested nodes to a simple key/value object
Check if an object is empty.
Stringify an object/array like JSON.stringify just without all the double-quotes
Returns a copy of an object with its keys sorted
defines static object attributes using Object.defineProperties
Tells you what keys from first object are missing in second
Merge two objects and concatenate arrays that are values of the same object key.
Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
Function
Function composition
simple curry module, with nothing too clever, and full test coverage
Run a function exactly one time
Bind a context to all functions in an object, including deeply nested functions.
module.exports = function (x) { return x }
Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input
Throttle and debounce functions.
A very tiny and fast compose function.
Math
I created this in 2014, when I was learning how to program.
JavaScript/Node.js utility. Returns true
if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.
I created this in 2014, the year I learned how to program. All of the downloads are from an old version of https://github.com/micromatch/micromatch. I've done a few other things since: https://github.com/jonschlinkert.
A tiny easy math include addition multiplication subtraction division.
Finds prime numbers using the Sieve of Eratosthenes algorithm.
Find the Greatest Common Divisor using Euclidean Algorithm
Stream
Tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise
A through2 wrapper to create an Array.prototype.filter analog for streams
A through2 to create an Array.prototype.map analog for streams.
A streams2 Readable stream generator, useful for testing.
writable stream that concatenates strings or data and calls a callback with the result
rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)
A small promise-based wrapper for through2
pipe streams together and close all of them if one of them closes
Check if something is a Node.js stream
Transform your data as it pass by, synchronously.
Promise
Promisify a callback-style function
Like Promise.all
but for object properties.
Resolves a promise after a specified delay.
Test whether an object looks like a promises-a+ promise
Data Structure
🎀 Just the cutest and tiniest queue/deque implementation!
File System
A rm -rf
util for nodejs
Recursively mkdir, like mkdir -p
, but in node.js
A simple JavaScript implementation of du -sb
📂 Lightweight filesize to human-readable / proportions w/o dependencies for node.js & browsers.
Temporary file and directory creator for node.js
[DEPRECATED] Use mz or fs-extra^3 with Promise support
Reads the username and email from .gitconfig
and returns it as json object
Browser
Lightweight event delegation
insert a string of css into the <head>
DOM element value getter/setter.
🎑🤞 Load one or more images, return a promise. Tiny, browser-only, no dependencies.
Get the real size of an <img>, <video>, or <canvas> in the browser.
Document ready listener for modern browsers
📄 Copy text from browser to clipboard...natively! < 1kB
Semver
The semver parser for node (the one npm uses)
Find maximum (or minimum) version according to semver
Find minimum in an array of version that satisfies a semver range.
CLI
Like ruby's Abbrev module
glob functionality for node.js
Get the username of the current user
parse argument options
convert png to ico format
Easily handle --help and --version arguments in your CLI application
Module management
Get namespaced config from the closest package.json
Normalize values in package.json to improve compatibility, programmatic readability and usefulness with third party libs.
Generators
Check whether a given value is a generator function
Other
Generate RFC-compliant UUIDs in JavaScript
Mime types for JavaScript
checks if foo is not defined, i.e. undefined, null, an empty string, array, object or NaN
Check if a string represent a fully qualified domain name
I'll give you the right URL, but don't call me Shirley!
Check all the available MIME types of an extension
Related lists
Delightful Node.js packages and resources
Awesome npm resources and tips