# haraka-utils

> Haraka general purpose functions

Latest version **2.2.1** (published 2026-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install haraka-utils
pnpm add haraka-utils
yarn add haraka-utils
bun add haraka-utils
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2026-06-05 |
| First published | 2016-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | Haraka Team |
| Maintainers | msimerson, tnpi, msergeant |
| Keywords | haraka, utility, utilities |

## Links

- npm: https://www.npmjs.com/package/haraka-utils
- Repository: https://github.com/haraka/haraka-utils
- Homepage: https://github.com/haraka/haraka-utils#readme
- Issues: https://github.com/haraka/haraka-utils/issues
- npm.io page: https://npm.io/package/haraka-utils

## Recent versions

- 2.2.1 (latest) — 2026-06-05
- 2.2.0 — 2026-06-03
- 2.1.1 — 2026-06-02
- 2.1.0 — 2026-05-28
- 2.0.0 — 2026-05-19
- 1.1.4 — 2025-01-31
- 1.1.3 — 2024-04-24
- 1.1.2 — 2024-04-07
- 1.1.1 — 2024-04-05
- 1.1.0 — 2024-04-05
- 1.0.3 — 2022-05-27
- 1.0.2 — 2020-04-11
- 1.0.1 — 2017-06-17
- 1.0.0 — 2016-11-15

## README

[![CI][ci-img]][ci-url]
[![Coverage Status][cov-img]][cov-url]
[![Maintainability][qlty-img]][qlty-url]

# haraka-utils

General purpose [haraka](https://haraka.github.io) utilities.

## Usage

```js
const utils = require('haraka-utils')
```

### getVersion (dir)

Gets the version of the NPM package located at dir. If the dir is a git repo, it also appends the commit ID.

```js
utils.getVersion('.') // '1.1.2/45e3812'
```

## See Also

- [haraka-net-utils](https://www.npmjs.com/package/haraka-net-utils)

[ci-url]: https://github.com/haraka/haraka-utils/actions/workflows/ci.yml
[ci-img]: https://github.com/haraka/haraka-utils/actions/workflows/ci.yml/badge.svg
[cov-url]: https://codecov.io/github/haraka/haraka-utils?branch=master
[cov-img]: https://codecov.io/github/haraka/haraka-utils/coverage.svg
[qlty-img]: https://qlty.sh/gh/haraka/projects/haraka-utils/maintainability.svg
[qlty-url]: https://qlty.sh/gh/haraka/projects/haraka-utils

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