commonjs-bot's repositories
is-fullwidth-code-point
Check if the character represented by a given Unicode code point is fullwidth
stringify-attributes
Turn an object into a string of HTML attributes
stable-fn
Ensure a function is stable, meaning the same input always produces the same output
split-on-first
Split a string on the first occurrence of a given separator
splice-string
Remove or replace part of a string like Array#splice
escape-string-applescript
Escape a string for use in AppleScript
djb2a
DJB2a non-cryptographic hash function
define-lazy-prop
Define a lazily evaluated property on an object
sleep-synchronously
Block the main thread for a given amount of time
time-span
Simplified high resolution timing
convert-hrtime
Convert the result of `process.hrtime()` to seconds, milliseconds, nanoseconds
skin-tone
Change the skin tone of an emoji
alpha-sort
Alphabetically sort an array of strings
aliases
Parse flag aliases in CLI help output
url-format-lax
Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port`
unique-random-array
Get consecutively unique elements from an array
unique-random
Generate random numbers that are consecutively unique
path-key
Get the PATH environment variable key cross-platform
pad-stream
Pad each line in a stream
p-whilst
While a condition returns true, calls a function repeatedly, and then resolves the promise
p-lazy
Create a lazy promise that defers execution until it's awaited or when .then() or .catch() is called
p-each-series
Iterate over promises serially
p-do-whilst
Calls a function repeatedly while a condition returns true and then resolves the promise
p-defer
Create a deferred promise
p-catch-if
Conditional promise catch handler
p-reduce
Reduce a list of values using promises into a promise for a value
pad-stdio
Pad stdout and stderr
split-lines
Split lines into an array of lines
lazy-value
Create a lazily evaluated value
clone-regexp
Clone and modify a RegExp instance