# bottom-line-utils

Latest version **0.24.3** (published 2026-08-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install bottom-line-utils
pnpm add bottom-line-utils
yarn add bottom-line-utils
bun add bottom-line-utils
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.24.3 |
| Published | 2026-08-18 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jacek Nowacki @dzek69 <git-public@dzek.eu> |
| Maintainers | dzek69 |

## Links

- npm: https://www.npmjs.com/package/bottom-line-utils
- Repository: https://github.com/dzek69/bottom-line.git
- npm.io page: https://npm.io/package/bottom-line-utils

## Recent versions

- 0.24.3 (latest) — 2026-08-18
- 0.11.0-beta.2 (beta) — 2021-01-08
- 0.24.2 — 2023-03-10
- 0.24.1 — 2022-11-08
- 0.24.0 — 2022-09-23
- 0.23.2 — 2022-08-21
- 0.23.1 — 2022-07-17
- 0.23.0 — 2022-07-17
- 0.22.0 — 2022-07-16
- 0.21.0 — 2022-07-08
- 0.20.0 — 2022-07-03
- 0.19.1 — 2022-04-27
- 0.19.0 — 2022-04-27
- 0.18.0 — 2021-12-04
- 0.17.1 — 2021-10-31
- … 31 more at https://npm.io/package/bottom-line-utils/versions

## README

# @ezez/utils

> Formerly: bottom-line-utils, but I never liked the name

A tiny and fast utils library.

## Documentation

Documentation can be found here: [documentation](https://ezez.dev/docs/utils/latest).

## Installing

`npm install @ezez/utils`

## Motivation

Lodash complexity that causes big bundle sizes just for using single function (even with tree shaking!).

Lodash is trying to cover each possible use case, even very rare while typical observed use case of lodash is basic
methods used on basic data. As an example, let's take a `_.pick` method that simply returns an object, based on source
object, with just some properties copied. Easy, right? Few lines of code? Lodash makes that 114 imports!

`@ezez/utils` aims to:
- cover only most typical use cases of given functions,
- add useful methods that are missing in lodash,
- NOT being 100% compatible replacement for lodash/underscore, while keeping MOST behavior identical,
- not being a "polyfill" (no `map`/`forEach` functions etc.),
- perform fast and have code size small.

## Supported methods

- `cap` - cap a value between lower and upper bound
- `capitalize` - capitalize a string, optionally lower casing the rest
- `coalesce` - return first non-nullish value
- `ensureArray` - ensure that given value is an array
- `ensureError` - ensure that given value is an error
- `get` - extract a value from a deep object using specified path, optionally with a default value
- `getMultiple` - same as above, but test multiple paths
- `insertSeparator` - insert a separator between every character in an array
- `isEmpty` - check if given value is empty
- `isPlainObject` - check if given value is a plain object
- `last` - get last element of an array
- `mapAsync` - map an array asynchronously if sync version blocks your event loop for too long
- `mapValues` - map values of an object
- `match` - split your array into two groups - one that matches given predicate, and one that doesn't
- `merge` - merge two objects shallowly, allowing to remove properties while doing so
- `mostFrequent` - find most frequent value in an array
- `noop` - do nothing
- `omit` - omit properties from an object
- `pack` - group array items into arrays of given size
- `pages` - create a pages list to display on front-end
- `pick` - pick some properties from an object
- `pull` - remove values from an array (by mutating)
- `remove` - remove values from an array (by mutating) using predicate function and return removed values
- `rethrow` - throw given value
- `scale` - scale given value from old range to new range
- `seq` - sequentially execute Promise-returning functions until one returns a value
- `set` - set a value in a deep object using specified path
- `setImmutable` - set a value in a deep object using specified path, but return a new object
- `sortBy` - sort an array by given property (create callback function for `Array.prototype.sort`)
- `throttle` - throttle a function, very configurable
- `truthy` - is value truthy? (useful for filtering with more correct TypeScript support than `filter(Boolean)`)
- `wait` - wait given amount of time (async)
- `waitSync` - wait given amount of time (sync)
- `waitFor` - wait for a condition to be true, checking every given amount of time

Methods will be added as I need them. I am open for suggestions and PRs. See next heading for list of methods that I
want to add.

## Methods to be supported

(TODO)
- debounce

## Tested

This library is fully unit tested and can be used on production. See License.

## License

MIT

---
_Source: https://npm.io/package/bottom-line-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
