diff --git a/README.md b/README.md index 6da9429..ee01707 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,25 @@ toggleInArray( //=> [{v: 1}, {v: 3}] ``` +## API + +### `toggleInArray(arr, value, [predicate])` + +Returns an `Array` with `value` if `arr` is not includes this `value`
+Returns an `Array` without `value` if `arr` is includes this `value` + +#### arr +*Required*
+Type: `Array` + +#### value +*Required*
+Type: `Array` + +#### predicate +Type: `Function`
+Default: `(a, b) => a === b` *Strict equality comparison* + ## License MIT © [Vladimir Rodkin](https://github.com/VovanR)