# @badosz/utils

> Utility functions

Latest version **1.8.0** (published 2022-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @badosz/utils
pnpm add @badosz/utils
yarn add @badosz/utils
bun add @badosz/utils
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.0 |
| Published | 2022-09-10 |
| First published | 2021-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bartosz Krol |
| Maintainers | badosz |

## Links

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

## Recent versions

- 1.8.0 (latest) — 2022-09-10
- 1.7.0 — 2022-09-10
- 1.6.0 — 2022-09-10
- 1.5.0 — 2022-07-21
- 1.4.0 — 2022-07-21
- 1.3.0 — 2022-07-21
- 1.2.0 — 2022-07-19
- 1.1.1 — 2022-02-16
- 1.1.0 — 2022-02-16
- 1.0.0 — 2021-12-30

## README

# @badosz/utils

> Utility functions I often find myself using in different projects

## Installation

```bash
$ npm install @badosz/utils
```

OR

```bash
$ yarn add @badosz/utils
```

## Usage
```ts
import { Time } from '@badosz/utils'

const weekend = Time
  .in(4, 'days')
  .add(2, 'weeks')
  .subtract(4, 'minutes')
  .isWeekend()

const greater = new Time().gt(Time.subtract(Time.in(4, 'days'), 8, 'weeks'))


const date = Time.in(-400_00)
const twoWeeksBetween = Time.between(Time.add(date, 4000), date) > Time.Units.WEEK * 2
const twoWeeksSince = Time.since(date) > Time.Units.WEEK * 2
```

## License

[MIT](https://tldrlegal.com/license/mit-license)

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