# scrolltome

> Library to manage if an element is in ViewPort

Latest version **1.0.2** (published 2020-02-26) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-02-26 |
| First published | 2020-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 95.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Juan Castro Fernández |
| Maintainers | castrofernandez |

## Links

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

## Dependencies (1)

- [setupme](https://npm.io/package/setupme.md) ^1.0.2

## Recent versions

- 1.0.2 (latest) — 2020-02-26
- 1.0.1 — 2020-02-17
- 1.0.0 — 2020-02-17

## README

# scrolltome
Library to manage if an element is in ViewPort

1. Install 

```
npm install scrolltome
```

2. Usage

```
scrolltome.subscribe({
    element: document.getElementById('section1'),
    inViewPortHandler: (data) => console.log(data),
    outOfViewPortHandler: (data) => console.log(data),
    repeat: 'FIRST_OUT',
});
```

3. Development

```
npm run dev
```

This watches files and compiles them

4. Run tests

```
npm run dev
npm start // or node server.js
npm test
```

`npm run dev` should be running to watch and recompile files.

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