<commit_before># Visible Element

[![NPM](https://nodei.co/npm/visible-element.png)](https://nodei.co/npm/visible-element/) [![Build Status](https://travis-ci.org/joeybaker/visible-element.png?branch=master)](https://travis-ci.org/joeybaker/visible-element)

For browsers only. Has two methods that allow you to detect if an element is visible to the user.

_NOTE: a DOM library (like jQuery) is required for one of the methods_

## Install
`npm install visible-element`

## Usage
```js
var $ = require('jquery')
  , visible = require('visible-element')($)

visible.inViewport($('#visible')) // → true
visible.inViewport($('#hidden')) // → false

// requires a DOM library
// the parent arg is optional, it'll default to $el.parent()
// this method is useful for parents that have `overflow: scroll`
visible.inContainer($('#visible'), $('#parent')) // → true
visible.inContainer($('#hidden'), $('#parent')) // → true
```

## Methods

### Initialization
The library must first be initialized before use.
<commit_msg>rm travis badge<commit_after># Visible Element

[![NPM](https://nodei.co/npm/visible-element.png)](https://nodei.co/npm/visible-element/)

For browsers only. Has two methods that allow you to detect if an element is visible to the user.

_NOTE: a DOM library (like jQuery) is required for one of the methods_

## Install
`npm install visible-element`

## Usage
```js
var $ = require('jquery')
  , visible = require('visible-element')($)

visible.inViewport($('#visible')) // → true
visible.inViewport($('#hidden')) // → false

// requires a DOM library
// the parent arg is optional, it'll default to $el.parent()
// this method is useful for parents that have `overflow: scroll`
visible.inContainer($('#visible'), $('#parent')) // → true
visible.inContainer($('#hidden'), $('#parent')) // → true
```

## Methods

### Initialization
The library must first be initialized before use.

{'fraction_non_alphanumeric': 0.16859852476290832, 'fraction_numerical': 0.0, 'mean_word_length': 4.651785714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '4239054', 'n_tokens_mistral': 571, 'n_tokens_neox': 548, 'n_words': 190}