# safe-to-capture

> Check whether a link dom node is safe to capture by a single page app.

Latest version **1.0.1** (published 2015-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install safe-to-capture
pnpm add safe-to-capture
yarn add safe-to-capture
bun add safe-to-capture
```

## 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 | 2015-09-17 |
| First published | 2015-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrew Herrington |
| Maintainers | andrew_h |
| Keywords | spa, webapp, single-page-webapp, link, href, external, internal, blank, target, a |

## Links

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

## Dependencies (1)

- [external-link](https://npm.io/package/external-link.md) ^2.0.0

## 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.1 (latest) — 2015-09-17
- 1.0.0 — 2015-08-03

## README

# Safe to capture
[![npm version](https://badge.fury.io/js/safe-to-capture.svg)](http://badge.fury.io/js/safe-to-capture)
[![Build Status](https://travis-ci.org/foiseworth/safe-to-capture.svg?branch=master)](https://travis-ci.org/foiseworth/safe-to-capture)
[![Coverage Status](https://coveralls.io/repos/foiseworth/safe-to-capture/badge.svg?branch=master&service=github)](https://coveralls.io/github/foiseworth/safe-to-capture?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 'safe to capture' by a single page web app.
Typically these will be links you wish to handle within the router.

A link is safe to capture if it:
* is not external
* is not a hash link to the current page
* has a href

## To use
```javascript
var isSafeToCapture = require('safe-to-capture');
var link = document.querySelector('a');

isSafeToCapture(link);
```

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