# dom-previous-element-sibling

> A ponyfill for element.previousElementSibling

Latest version **1.0.0** (published 2017-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install dom-previous-element-sibling
pnpm add dom-previous-element-sibling
yarn add dom-previous-element-sibling
bun add dom-previous-element-sibling
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-10-10 |
| First published | 2017-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Quentin Engles |
| Maintainers | hollowdoor |
| Keywords | DOM, element, sibling |

## Links

- npm: https://www.npmjs.com/package/dom-previous-element-sibling
- Repository: https://github.com/hollowdoor/dom_previous_element_sibling
- Homepage: https://github.com/hollowdoor/dom_previous_element_sibling#readme
- Issues: https://github.com/hollowdoor/dom_previous_element_sibling/issues
- npm.io page: https://npm.io/package/dom-previous-element-sibling

## 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) — 2017-10-10

## README

dom-previous-element-sibling
===========

Install
-----

`npm install --save dom-previous-element-sibling`

Usage
---

```javascript
import previousElementSibling from 'dom-previous-element-sibling';

let element = document.querySelector('ol').children[1];
console.log(element.innerHTML);//Second
let first = previousElementSibling(element);
console.log(first.innerHTML);//First
```

About
----

IE before IE9 doesn't support `element.previousElementSibling`. This module is a ponyfill for that.

Also see [dom-next-element-sibling](https://github.com/hollowdoor/dom_next_element_sibling).

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