# acquire-anchor

> Given a DOM node, find the nearest anchor node.

Latest version **1.0.0** (published 2015-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install acquire-anchor
pnpm add acquire-anchor
yarn add acquire-anchor
bun add acquire-anchor
```

## 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 | 2015-08-04 |
| First published | 2015-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andrew Herrington |
| Maintainers | andrew_h |
| Keywords | find, anchor, link, href, external, internal, blank, target, a, dom |

## Links

- npm: https://www.npmjs.com/package/acquire-anchor
- Repository: https://github.com/foiseworth/acquire-anchor
- Homepage: https://github.com/foiseworth/acquire-anchor#readme
- Issues: https://github.com/foiseworth/acquire-anchor/issues
- npm.io page: https://npm.io/package/acquire-anchor

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-08-04

## README

# Acquire anchor
[![npm version](https://badge.fury.io/js/acquire-anchor.svg)](http://badge.fury.io/js/acquire-anchor)
[![Build Status](https://travis-ci.org/foiseworth/acquire-anchor.svg?branch=master)](https://travis-ci.org/foiseworth/acquire-anchor)
[![Coverage Status](https://coveralls.io/repos/foiseworth/acquire-anchor/badge.svg?branch=master&service=github)](https://coveralls.io/github/foiseworth/acquire-anchor?branch=master)
![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)

A function that given a node will return the nearest anchor node starting at the
passed node and walking up the tree until there are no more parent nodes.

## To use
```javascript
var acquireAnchor = require('acquire-anchor');
var childNode = document.querySelector('.child-node');

var anchorNode = acquireAnchor(childNode);
```

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