<commit_before># @ebay/jquery-next-id

<p>
    <a href="https://travis-ci.org/ianmcburnie/jquery-next-id"><img src="https://api.travis-ci.org/ianmcburnie/jquery-next-id.svg?branch=master" alt="Build Status" /></a>
    <a href='https://coveralls.io/github/ianmcburnie/jquery-next-id?branch=master'><img src='https://coveralls.io/repos/ianmcburnie/jquery-next-id/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
</p>

jQuery collection plugin that will assign the next ID in sequence if an ID property does not already exist.

```js
$(collection).nextId([prefix]);
```

## Experimental

This plugin is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.

Please use the tilde range specifier in your package.json to pin to a fixed major and minor version.

## Install

```js
npm install @ebay/jquery-next-id --save
```

The NPM package also includes a minified version of the plugin.

## Defaults

```js
$.fn.nextId.defaults = {
    prefix : 'nid',
    separator : '-'
};
```

## Example

Input:

```html
<div /><div />
```<commit_msg>Added David badges to README<commit_after># @ebay/jquery-next-id

<p>
    <a href="https://travis-ci.org/ianmcburnie/jquery-next-id"><img src="https://api.travis-ci.org/ianmcburnie/jquery-next-id.svg?branch=master" alt="Build Status" /></a>
    <a href='https://coveralls.io/github/ianmcburnie/jquery-next-id?branch=master'><img src='https://coveralls.io/repos/ianmcburnie/jquery-next-id/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
    <a href="https://david-dm.org/ianmcburnie/jquery-next-id"><img src="https://david-dm.org/ianmcburnie/jquery-next-id.svg" alt="Dependency status" /></a>
    <a href="https://david-dm.org/ianmcburnie/jquery-next-id#info=devDependencies"><img src="https://david-dm.org/ianmcburnie/jquery-next-id/dev-status.svg" alt="devDependency status" /></a>
</p>

jQuery collection plugin that will assign the next ID in sequence if an ID property does not already exist.

```js
$(collection).nextId([prefix]);
```

## Experimental

This plugin is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.

## Install

```js
npm install @ebay/jquery-next-id
```

## Defaults

```js
$.fn.nextId.defaults = {
    prefix : 'nid',
    separator : '-'
};
```

## Example

Input:

```html
<div /><div />
```
{'fraction_non_alphanumeric': 0.16368584758942456, 'fraction_numerical': 0.0023328149300155523, 'mean_word_length': 4.40546218487395, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4749704', 'n_tokens_mistral': 889, 'n_tokens_neox': 855, 'n_words': 218}