<commit_before># vue-a2b

> split testing for Vuejs

### Initialization
``` js
import VueAB from 'vue-a2b'
Vue.use(VueAB)
```

## Usage 

*vue-a2b* uses [named slots](https://vuejs.org/v2/guide/components.html#Named-Slots) for different variations.
Any amount of variations is supported (A/B/n). The the test identifier should be used as slot name and can be any valid string.
Chances are given as ratio. In the first example, *test A* has twice the chance to be selected over *test B*:

    Note: Chances are parsed as whole numbers, so instead of *2.5* and *1* use *5* and *2*.

### minimal example

``` html
<template>
  <split-test><commit_msg>README update<commit_after># vue-a2b

> split testing for Vuejs

## Usage

Add the package to your project:

``` bash
yarn add vue-a2b
# or
npm install vue-a2b
```

…and register it to Vue:

``` js
import VueAB from 'vue-a2b'
Vue.use(VueAB)
```

*vue-a2b* uses [named slots](https://vuejs.org/v2/guide/components.html#Named-Slots) for defining test variations.
Any amount of variations is supported (A/B/n). The the variation identifier should be used as slot name and can be any valid string.
Selection chances are given as ratio. In the first example, **test A** has twice the chance to be selected over **test B**:

    Note: Selection chances are parsed as whole numbers, so instead of 2.5 and 1 use 5 and 2.

### minimal example

``` html
<template>
  <split-test>
{'fraction_non_alphanumeric': 0.1122088920254058, 'fraction_numerical': 0.014114326040931546, 'mean_word_length': 3.975438596491228, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '7400721', 'n_tokens_mistral': 484, 'n_tokens_neox': 462, 'n_words': 195}