awesome-micro-npm-packages
精选的小型NPM包的精选列表
https://github.com/deepppppppppppppppppppppppppppppppppppp/awesome-micro-npm-packages
Last synced: 7 days ago
JSON representation
-
Modules
-
CLI
- username - Get the username of the current user.
- glob - Glob functionality for node.js.
- png-to-ico - Convert png to windows ico format.
- help-version - Easily handle --help and --version arguments in your CLI application
-
File System
- rimraf - A deep deletion module for node (like rm -rf).
- tmp - Temporary file and directory creator for node.js.
- du - A simple JavaScript implementation of du -sb.
- fs-promise - Node fs methods as Promise/A+ (optional fs-extra, graceful-fs).
- mkdirp - Recursively mkdir, like mkdir -p.
- file-size - Lightweight filesize to human-readable / proportions w/o dependencies.
-
Date & Time
- fecha - Javascript Date formatting and parsing.
- twas - Generate a relative time string (Example: "3 seconds ago")
- timeago.js - A tiny(~1.7kb) library used to format date with `*** time ago` statement.
- pretty-ms - Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s.
- time-stamp - Get a formatted timestamp.
- count-days-in-month - Get the number of days in a given month.
- periods - Defined time-periods constants for Javascript, in milliseconds.
- hirestime - A wrapper around the built-in high resolution timer which simplifies the calculation of timestamps.
- akamai-time-reference - Get reference time using Akamai's time reference service.
-
Array
- group-array - Group array of objects into lists.
- arr-diff - Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
- unordered-array-remove - Efficiently remove an element from an unordered array without doing a splice.
- arr-flatten - Recursively flatten an array or arrays.
- array-last - Return the last element in an array.
- in-array - Return true if any of passed values exists in array - faster than using indexOf.
- array-first - Get the first element or first n elements of an array.
- array-range - Creates a new array with given range.
- array-swap - Swap position of two items in an array.
- is-sorted - A small module to check if an Array is sorted.
- map-array - Map object keys and values into an array.
- filled-array - Returns an array filled with the specified input
- dedupe - Remove duplicates from an array.
- mirrarray - Creates a keymirror object from an array of valid keys.
- array.chunk - Split array/TypedArray to chunks of given size.
-
Semver
- semver - 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.
-
Promise
- pify - Promisify a callback-style function.
- is-promise - Test whether an object looks like a promises-a+ promise.
- sleep-promise - Resolves a promise after a specified delay.
- promise-all-props - Like `Promise.all` but for object properties.
-
Stream
- through2 - Tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise.
- pump - pipe streams together and close all of them if one of them closes.
- JSONStream - streaming JSON.parse and stringify
- syncthrough - Transform your data as it pass by, synchronously.
- split - Break up a stream and reassemble it so that each line is a chunk.
- is-stream - Check if something is a Node.js stream.
- stream-spigot - A readable stream generator, useful for testing or converting simple functions into Readable streams.
- through2-filter - A through2 to create an Array.prototype.filter analog for streams.
- through2-map - A through2 to create an Array.prototype.map analog for streams.
- through2-map-promise - A small promise-based wrapper for through2.
- concat-stream - writable stream that concatenates strings or data and calls a callback with the result.
-
Browser
- delegate - Lightweight event delegation.
- copee - Copy text from browser to clipboard...natively!
- document-ready - Document ready listener for modern browsers.
- dom-element-value - DOM element value getter/setter.
-
Object
- get-value - Use property paths (a.b.c) to get a nested value from an object.
- deep-object-diff - Deep diff two JavaScript Objects while preserving the data structure. Including nested structures of Arrays and Objects.
- deep-assign - Recursive Object.assign().
- object-values - Get the values of an object.
- set-value - Create nested values and any intermediaries dot notation (`'a.b.c'`) paths.
- map-obj - Map object keys and values into a new object.
- filter-obj - Filter object keys and values into a new object.
- static-props - Defines static object attributes using `Object.defineProperties`
- sorted-object - Returns a copy of an object with its keys sorted.
- has-value - Returns true if a value exists, false if empty. Works with deeply nested values using dot notation (`'a.b.c'`) paths.
- flatten-obj - Converts an object literal with deeply nested nodes to a simple key/value object.
- just-pluck - Pluck without the madness.
- object-pairs - Turn an object into list of [key, value] pairs for mapping, iterating or other purposes.
- flatkeys - Flatten object key hierarchies into a list of strings using a custom separator.
- is-empty-object - Check if an object is empty.
- zipmap - Returns a map with the keys mapped to the corresponding vals. zipmap also accepts a single value of objects or pairs.
- has-key-deep - Deep-search objects for keys. Keys can be searched by providing an array of keys, or using a dot-notiation.
- has-own-property - Check if an object has a local property.
- missing-deep-keys - Returns an array of keys from first object that are missing in second.
- stringify-object - Stringify an object/array like JSON.stringify just without all the double-quotes.
-
String
- strip-ansi - Strip ANSI escape codes.
- decamelize - Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow.
- node-slug - slugifies even utf-8 chars.
- striptags - An implementation of PHP's strip_tags in Node.js.
- pad-left - Left pad a string with zeros or a specified string.
- slice.js - Javascript library to engance String.substring / Array.slice with python slice style.
- to-dot-case - Convert a string to a dot case.
- to-no-case - Remove an existing case from a string.
- to-title-case - Convert a string to a title case.
- to-constant-case - Convert a string to a constant case.
- to-pascal-case - Convert a string to a pascal case.
- to-capital-case - Convert a string to a capital case.
- to-camel-case - Convert a string to a camel case.
- to-sentence-case - Convert a string to a sentence case.
- to-space-case - Convert a string to a space case.
- to-snake-case - Convert a string to a snake case.
- rtrim - Strip whitespace - or other characters - from the end of a string.
- parse-next-json-value - Parse next JSON value from string allowing extraneous characters after value.
-
Function
- throttle-debounce - Throttle/debounce your functions.
- compose-tiny - A very tiny and fast compose function.
- curry - A curry function without anything too clever.
- deep-bind - Bind a context to all functions in an object, including deeply nested functions.
- once - Run a function exactly one time.
- compose-function - Compose a new function from smaller functions `f(g(x))`.
- mem - An optimization technique used to speed up consecutive function calls by caching the result of calls with identical input.
-
Other
- not-defined - 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.
- node-mime - Comprehensive MIME type mapping API based on mime-db module.
- uuid - Generate RFC-compliant UUIDs in JavaScript.
-
Math
- is-number - Returns `true` if the value is a number.
-
Module management
- normalize-pkg - Normalize values in package.json to improve compatibility, programmatic readability and usefulness with third party libs.
- pkg-conf - Get namespaced config from the closest package.json.
-
Generators
- is-generator - Check whether a given value is a generator function.
-
-
Small modules rockstars to follow
-
Articles
- One-line node modules
- Small modules: it’s not quite that simple
- In Defense of Hyper Modular JavaScript
- The cost of small modules
- Build small single purpose modules
- Why I think "micro-packages" are a good thing.
- Module best practices
- Build small single purpose modules
- Why I think "micro-packages" are a good thing.
- Tiny npm package: Guidelines to create a Node.js module following the small package philosophy
-
Related lists
-
Other
- awesome-nodejs - A curated list of delightful Node.js packages and resources.
- awesome-npm - Awesome npm resources and tips.
-
Programming Languages
Sub Categories
Keywords
javascript
19
nodejs
13
utility
12
case
10
array
8
node
8
object
6
util
3
dot-notation
3
nested
3
value
3
jonschlinkert
3
awesome
2
awesome-list
2
microlib
2
list
2
get
2
dot-prop
2
deep-property
2
deep
2
diff
2
date
2
time
2
timeago
2
object-path
2
datetime
2
slice
2
string
2
lodash
2
property
2
get-deep
1
paths
1
cli
1
converter
1
key
1
ico
1
image
1
values
1
image-processing
1
png
1
parsing
1
ago
1
from-now
1
relative
1
npm-cli
1
promise-utilities
1
promises
1
promisify
1
date-format
1
i18n
1