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.
updated at Nov. 13, 2024, 10:48 p.m.
Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
updated at Nov. 1, 2024, 11:12 p.m.
Returns an array with only the unique values from all given arrays using strict equality for comparisons.
updated at Nov. 1, 2024, 11:12 p.m.
Use property paths (`a.b.c`) get a nested value from an object.
updated at Oct. 28, 2024, 8:19 a.m.
Returns true if the platform is Windows (and Cygwin or MSYS/MinGW for unit tests)
updated at Oct. 19, 2024, 6:49 a.m.
Bind a context to all functions in an object, including deeply nested functions.
updated at Sept. 22, 2024, 4:18 p.m.
Set nested properties on an object using dot-notation.
updated at July 26, 2024, 12:29 a.m.
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
updated at July 23, 2024, 2:03 a.m.
Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
updated at May 29, 2024, 11:46 a.m.
Return the last element in an array. Faster than `.slice`
updated at Jan. 5, 2024, 2:04 p.m.
Left pad a string with zeros or a specified string. Fastest implementation.
updated at Dec. 6, 2022, 1:07 a.m.
Get the first element or first n elements of an array.
updated at Dec. 26, 2021, 4:08 a.m.
Normalize values in package.json to improve compatibility, programmatic readability and usefulness with third party libs.
updated at May 15, 2021, 1 p.m.
Return true if a value exists in an array. Faster than using indexOf and won't blow up on null values.
updated at April 12, 2021, 10:36 p.m.