# external-link

> Check whether a link dom node links to an 'external' website.

Latest version **2.0.0** (published 2015-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install external-link
pnpm add external-link
yarn add external-link
bun add external-link
```

## 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 | 2.0.0 |
| Published | 2015-08-21 |
| First published | 2015-08-03 |
| 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 | link, href, external, internal, blank, target, a |

## Links

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

## 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

- 2.0.0 (latest) — 2015-08-21
- 1.0.0 — 2015-08-03

## README

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


A simple function that tells you whether a link DOM node is 'external'.

A link is external if it:
* has the attribute rel="external"
* has the attribute target and the value is not \_self
* is an absolute link
* is a telephone link
* is a mailto link


## To use
```javascript
var external = require('external-link');
var link = document.querySelector('a');

external(link);
```

## Versions
2.0.0 - changed handling of target so that any value other than \_self will make it external

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