# scroll-direction

> Get the scroll direction!

Latest version **1.0.0** (published 2016-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install scroll-direction
pnpm add scroll-direction
yarn add scroll-direction
bun add scroll-direction
```

## 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.0 |
| Published | 2016-08-02 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Hemanth.HM |
| Maintainers | hemanth |
| Keywords | dom, events, scroll, scroll-direction, mouse |

## Links

- npm: https://www.npmjs.com/package/scroll-direction
- Repository: https://github.com/hemanth/scroll-direction
- Homepage: https://github.com/hemanth/scroll-direction#readme
- Issues: https://github.com/hemanth/scroll-direction/issues
- npm.io page: https://npm.io/package/scroll-direction

## Dependencies (2)

- [is-dom](https://npm.io/package/is-dom.md) ^1.0.5
- [is-function](https://npm.io/package/is-function.md) ^1.0.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-08-02

## README

# scroll-direction

> Get the scroll direction!

## Install

```
$ npm install --save scroll-direction
```


## Usage

```js
const scrollDirection = require('scroll-direction');

scrollDirection(window, direction => (console.log(direction))); 
```

## API

### scrollDirection(domElement, cb)

#### domElement

Type: `node`

The DOM element on which you are intrested to listen on scroll.

#### cb

Type: `function`

The `callback` function, which responds with the `direction`

P.S: `direction` -> `1` is scroll up and `0` is scroll down.


## License

MIT © [Hemanth.HM](https://h3manth.com)

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