<commit_before># 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
* it is not a hash link to the current page
* it has a href

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

isSafeToCapture(link);
```<commit_msg>Fix mis-wording<commit_after># 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);
```
{'fraction_non_alphanumeric': 0.152128764278297, 'fraction_numerical': 0.0, 'mean_word_length': 5.117460317460317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6900111', 'n_tokens_mistral': 647, 'n_tokens_neox': 632, 'n_words': 159}