# boobreaks

> Use Bootstraps breakpoints inside your JavaScript!

Latest version **4.0.1** (published 2019-10-31) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install boobreaks
pnpm add boobreaks
yarn add boobreaks
bun add boobreaks
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2019-10-31 |
| First published | 2019-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marvin Heilemann |
| Maintainers | muuvmuuv |
| Keywords | bootstrap, breakpoints, utility |

## Links

- npm: https://www.npmjs.com/package/boobreaks
- Repository: https://github.com/muuvmuuv/boobreaks
- Issues: https://github.com/muuvmuuv/boobreaks/issues
- npm.io page: https://npm.io/package/boobreaks

## Dependencies (1)

- [bootstrap](https://npm.io/package/bootstrap.md) ^4.3.1

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2019-10-31
- 4.0.0 — 2019-10-31
- 3.3.0 — 2019-05-08
- 3.2.0 — 2019-05-08
- 3.0.1 — 2019-05-08
- 3.0.0 — 2019-05-08
- 2.3.2 — 2019-03-14
- 2.3.1 — 2019-03-14
- 2.3.0 — 2019-03-14

## README

# Boobreaks 📏

[Demo](https://muuvmuuv.github.io/boobreaks/)

A simple and small (881 bytes) utility to make [Bootstraps breakpoints][1] available in
your JavaScript files.

> Tested with Bootstrap version: 4.3.1

- [Installation](#installation)
- [How to use](#how-to-use)
  - [UMD](#umd)
  - [CommonJS](#commonjs)
- [Available functions](#available-functions)

## Installation

```bash
npm install boobreaks
```

## How to use

### UMD

Load the library:

```html
<!-- <head> -->
<link rel="stylesheet" href="./path/to/boobreaks.umd.css" />
<script defer src="./path/to/boobreaks.umd.js"></script>
<!-- </head> -->
```

Use it:

```js
console.log(`Breakpoint is at`, Boobreaks.current(), Boobreaks.width())
```

### CommonJS

```javascript
import 'boobreaks/dist/boobreaks.css'
import { current, width } from 'boobreaks'

console.log(`Breakpoint is at`, current(), width())
```

## Available functions

| Function    | Params     | Return   | Description                                                |
| ----------- | ---------- | -------- | ---------------------------------------------------------- |
| `current()` | none       | `string` | Current breakpoint alias.                                  |
| `width()`   | none       | `number` | Current screen width by alias.                             |
| `is()`      | expression | `string` | If the current screen matches the expression, e.g.: `>=sm` |

[1]: https://getbootstrap.com/docs/4.3/layout/overview/#responsive-breakpoints

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