Skip to content

Commit

Permalink
updates typo in code snippet (#450)
Browse files Browse the repository at this point in the history
changes comparator function param to match reference
  • Loading branch information
gordonhgraham authored and victorquinn committed Dec 4, 2019
1 parent 1784dc3 commit 0cee66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/miscellaneous/unique.md
Expand Up @@ -19,7 +19,7 @@ Optionally specify the comparator used to determine whether a generated item is

```js
chance.unique(chance.currency, 2, {
comparator: function(err, val) {
comparator: function(arr, val) {
return arr.reduce(function(acc, item) {
return acc || (item.code === val.code);
}, false);
Expand Down

0 comments on commit 0cee66c

Please sign in to comment.