# height-checker

> Checks the height of DOM elements

Latest version **1.0.0** (published 2019-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install height-checker
pnpm add height-checker
yarn add height-checker
bun add height-checker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-08 |
| First published | 2019-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sergey Zwezdin |
| Maintainers | sergeyzwezdin |
| Keywords | front-end, frontend, web, responsive, responsive-ui, mobile-first, layout, debug |

## Links

- npm: https://www.npmjs.com/package/height-checker
- Repository: https://github.com/sergeyzwezdin/height-checker
- Homepage: https://github.com/sergeyzwezdin/height-checker#readme
- Issues: https://github.com/sergeyzwezdin/height-checker/issues
- npm.io page: https://npm.io/package/height-checker

## Dependencies (1)

- [custom-event-polyfill](https://npm.io/package/custom-event-polyfill.md) ^1.0.7

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-12-08
- 0.0.2 — 2019-12-08
- 0.0.1 — 2019-12-08

## README

# Height Checker

The simple tool that checks height of DOM elements and write console messages if it is not multiplie of specific number.

## Usage

1. Install the package:

```bash
> npm install height-checker
```

2. Add `data-check-height` attribute to DOM elements that should be checked:

```html
<div data-check-height="8">
</div>
```

`data-check-height` attribute should contain multiplier. If its value is empty, the default value `8` will be used.

3. Init height checker:

```javascript
import { initHeightChecker } from 'height-checker';

initHeightChecker();
```

Also, you can pass log level parameter to the method:

```javascript
initHeightChecker('info');
```

Allowed values of log level:
- log
- warn
- info
- error

The height will be checked on window resize as well as on DOM manipulation. Once element's height is not multiplie of the defined size, you will see error message in browser's console.

## License

The project is released under the [MIT License](https://raw.githubusercontent.com/sergeyzwezdin/height-checker/master/LICENSE).

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