Skip to content

Commit

Permalink
docs(readme): Add API section in Readme
Browse files Browse the repository at this point in the history
close #7
  • Loading branch information
VovanR committed Jan 24, 2018
1 parent 8df6408 commit 4341086
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`<br>
Returns an `Array` without `value` if `arr` is includes this `value`

#### arr
*Required*<br>
Type: `Array`

#### value
*Required*<br>
Type: `Array`

#### predicate
Type: `Function`<br>
Default: `(a, b) => a === b` *Strict equality comparison*

## License
MIT © [Vladimir Rodkin](https://github.com/VovanR)

Expand Down

0 comments on commit 4341086

Please sign in to comment.