npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bitfinex/lib-js-util-base

v2.0.0

Published

general utils

Readme

lib-js-util-base

General node js utils library.

Currently supported utils:

  • assignWith - Assigns the object properties from the sources
  • camelize - simple camel case
  • capitalize - make first char uppercase
  • chunk - splits array into chunks of specified size
  • clone - Shallow clone the object
  • cloneDeep - deep clone functionality for objects
  • difference - creates an array of values from the first argument not included in the second argument
  • differenceWith - creates an array of values from the first argument not included in the second one using comparator function
  • findLastIndex - Returns the index of the last element in the array that satisfies the provided testing function.
  • flow - generate a composite function that returns the result of provided functions called by the chain; each previous function result passes as the argument of the next function in the chain
  • freezeDeep - deep freezes objects
  • get - get the object members by path
  • getArrayHasIntersect - checks if arrays have at least one common value
  • getArrayUniq - gets unique values form array
  • invert - Inverts the key-value pairs of an object
  • groupBy - groups the elements of an array by a specified key.
  • isBoolean - checks if value is a boolean
  • isEmpty - checks if value is an empty object, collection, map, or set
  • isEqual - check if passed two values are equal
  • isFinite - checks if input is a finite number.
  • isFunction - checks if input is a Function object.
  • isMatch - Checks if first argument is a match with last
  • isNil - checks whenever value is null or undefined
  • isNumber - checks if input is a number.
  • isObject - checks if the input is not a nullable object instance
  • isObjectLike - Checks if passed value is object-like. A value is object-like if it's not null
  • isPlainObject - checks if input is object, not null object and not array object
  • isString - checks if input is a string
  • isUndefined - checks if an input is undefined
  • mapKeys - creates new object with the same values but with keys mapped by the provided function
  • mapValues - Maps the values of an object or array using the provided iteratee function or property path
  • matches - creates a function that makes a deep partial comparison on a given object with the source
  • max - computes the maximum value of array. If array is empty or falsey, undefined is returned
  • maxBy - gets the maximum value from a collection by iteratee
  • mean - Returns the mean of an array of numbers
  • merge - deep merge functionality for objects
  • min - computes the minimum value of array. If array is empty or falsey, undefined is returned
  • minBy - gets the minimum value from a collection by iteratee
  • omit - provides new object that omits only specific fields of source object (supports nested paths)
  • omitBy - provides new object that omits only specific fields of source object depending on predicate function filter
  • pick - provides new object that picks only specific fields of source object
  • pickBy - provides new object that picks only specific fields of source object depending on predicate function filter
  • resolvePromiseCb - helper to add callback support to async functions
  • sample - returns pseudo random element on the collection
  • set - sets the value at path of object
  • shuffle - performs pseudo random shuffle on clone of the array
  • snakeCase - convert camel case and string/dash separated strings to snake case
  • sum - calculate sum of array items
  • sumBy - calculate sum of array items using iteratee function or string shortcut
  • transformKeysToSnake - transform every object key to snake case with option to be recursive
  • union - Returns the union of the given arrays
  • uniq - Returns unique values of the array
  • uniqBy - get unique values of array by the iteratee function or property path
  • uniqWith - Returns a new array with unique values, using a comparator function
  • unset - Remove a property by the path in any depth, returns true if succeed, false otherwise
  • update - Update the object with the updater by path
  • upperFirst - converts the first character of string to upper case
  • validateInput - validates the input based on the regex format options: NUMBER | EMAIL | PATH | NAME | NAME_WITH_DIGITS | INPUT | ADDRESS | PHONE_CODE | PHONE | IMAGE | FILE | FILENAME | PASSWORD | URL
  • without - creates an array of values from the first argument excluding all given arguments