- **Description**

Creates a validator which checks if a value is strictly(===) one of provided `allowedValues`.

- **How to import**

```typescript
import { oneOf } from 'pipedator';
// or
import { oneOf } from 'pipedator/lib/oneOf';

```
- **Signature**

```typescript
function oneOf<ValidValue = any>(allowedValues: (any | ValidationRef)[], message?: string): Validator<ValidValue>;
```
- **Parameters**

  - `allowedValues` - any values the tested value should be one of or the reference to the part of complex value (like object).
  - `message` - (optional) custom message


- **Usage**

```typescript
oneOf(['ts', 'js']).validate('ts'); // valid
oneOf(['ts', 'js']).validate('css'); // invalid
oneOf(['ts', 'js'], 'Custom message').validate('php'); // invalid with 'Custom message'

import { shape, ref, string } from 'pipedator';

const validator = shape({ a: string(), b: oneOf(['ts', ref(['a'])]) });

validator.validate({ a: 'js', b: 'ts' }); // valid
validator.validate({ a: 'js', b: 'js' }); // valid
validator.validate({ a: 'test', b: 'text' }); // invalid
```