<commit_before># cupidon-ac

> Cupidon Autocompleter (a.k.a. cupidon-ac) is an extended
[jQuery UI Autocomplete](http://jqueryui.com/autocomplete/)
widget with a "must match" feature.

[![Build Status](https://travis-ci.org/hooktstudios/cupidon-ac.png?branch=master)](https://travis-ci.org/hooktstudios/cupidon-ac)

## Demo
[→ here](http://hooktstudios.github.com/cupidon-ac/examples.html)

## Usage

Cupidon Autocompleter ensure the user selects a value that comes from your source list.

### Empty input
```html
<input id="input1" type="text" value="">
```

```javascript
// The source is *required*
$('#input1').cupidon({
  source: [{label: "Ruby", value: 1}, {label: "Python", value: 3}]
});
// Source could also be a URL, or any valid jQuery UI Autocompleter source
$('#input1').cupidon({ source: '/cupidon-find-me-a-lover' });
```

### Pre-filled input
```html
<input id="input2" type="text" data-ac-token="<PASSWORD>" value="1337">
```<commit_msg>Add npm package version badge [ci skip]<commit_after># cupidon-ac

> Cupidon Autocompleter (a.k.a. cupidon-ac) is an extended
[jQuery UI Autocomplete](http://jqueryui.com/autocomplete/)
widget with a "must match" feature.

[![Build Status](https://travis-ci.org/hooktstudios/cupidon-ac.png?branch=master)](https://travis-ci.org/hooktstudios/cupidon-ac)
[![NPM version](https://badge.fury.io/js/cupidon-ac.png)](https://npmjs.org/package/cupidon-ac)

## Demo
[→ here](http://hooktstudios.github.com/cupidon-ac/examples.html)

## Usage

Cupidon Autocompleter ensure the user selects a value that comes from your source list.

### Empty input
```html
<input id="input1" type="text" value="">
```

```javascript
// The source is *required*
$('#input1').cupidon({
  source: [{label: "Ruby", value: 1}, {label: "Python", value: 3}]
});
// Source could also be a URL, or any valid jQuery UI Autocompleter source
$('#input1').cupidon({ source: '/cupidon-find-me-a-lover' });
```

### Pre-filled input
```html
<input id="input2" type="text" data-ac-token="<PASSWORD>" value="1337">
```
{'fraction_non_alphanumeric': 0.1935960591133005, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 5.13595166163142, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1385118', 'n_tokens_mistral': 764, 'n_tokens_neox': 724, 'n_words': 176}