# page-module

> Page module that can be used to get sizes and parameters easily.

Latest version **1.0.1** (published 2016-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install page-module
pnpm add page-module
yarn add page-module
bun add page-module
```

## 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.1 |
| Published | 2016-02-26 |
| First published | 2016-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kasper Reijnders |
| Maintainers | kasperreijnders |
| Keywords | page, parameters, height, sizes |

## Links

- npm: https://www.npmjs.com/package/page-module
- Repository: https://github.com/incentro/PageModule
- Homepage: https://github.com/incentro/PageModule#readme
- Issues: https://github.com/incentro/PageModule/issues
- npm.io page: https://npm.io/package/page-module

## Recent versions

- 1.0.1 (latest) — 2016-02-26
- 1.0.0 — 2016-02-18

## README

# PageModule

A simple page module that can do basic things like get the window size, position of a specific element and retrieve a parameters object from the url.

## Install

```
$ npm install page-module --save 
```

## Usage

PageModule is an EcmaScript 2015 module. Use it as follows:

```
import Page from 'page-module';

Page.getTopOfWindow();
```

The api contains the following functions:

| Function                          | Description                                            |
| --------------------------------- | ------------------------------------------------------ |
| `Page.getParameter(key);`         | (string) Get a specific parameter string from the url  |
| `Page.getParameters();`           | (json) Get all parameters in a `json` object           |
| `Page.getTopOfElement(elem);`     | (number) Get the top position of an element            |
| `Page.getMiddleOfElement(elem);`  | (number) Get the center position of an element         |
| `Page.getBottomOfElement(elem);`  | (number) Get the bottom position of an element         |
| `Page.getTopOfWindow();`          | (number) Get the top position of the window            |
| `Page.getBottomOfWindow();`       | (number) Get the bottom position of the window         |


## Build

```
$npm run-script build
```

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