<commit_before>![Text.js](http://i.imgur.com/bKsWSRK.png)

A collection of utilities for manipulating and editing text, with no dependencies. Text.js
provides easy interfaces to some of the most common things you need when managing textareas
(and other text inputs). Everything is separated into modules as needed.

## Current Modules

###1. `Cursor`

#### Usage

```javascript

textarea = document.getElementById('#myTextarea');
var cursor = new Text.Cursor(textarea);

var position = cursor.position // Returns integer index
cursor.position = 25 // Sets position to index
```

### 2. `CurrentWord`

#### Usage:

Given a textarea with the following text and cursor (represented by the pipe character `|`):

> hey there guy`|`s this is my textarea<commit_msg>how to bower<commit_after>![Text.js](http://i.imgur.com/bKsWSRK.png)

A collection of utilities for manipulating and editing text, with no dependencies. Text.js
provides easy interfaces to some of the most common things you need when managing textareas
(and other text inputs). Everything is separated into modules as needed.

```shell
$ bower install --save Text.js
```

## Current Modules

###1. `Cursor`

#### Usage

```javascript

textarea = document.getElementById('#myTextarea');
var cursor = new Text.Cursor(textarea);

var position = cursor.position // Returns integer index
cursor.position = 25 // Sets position to index
```

### 2. `CurrentWord`

#### Usage:

Given a textarea with the following text and cursor (represented by the pipe character `|`):

> hey there guy`|`s this is my textarea
{'fraction_non_alphanumeric': 0.11267605633802817, 'fraction_numerical': 0.005121638924455826, 'mean_word_length': 4.622302158273381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6732471', 'n_tokens_mistral': 460, 'n_tokens_neox': 425, 'n_words': 182}