Skip to content

Commit

Permalink
docs(collections): add description for single
Browse files Browse the repository at this point in the history
  • Loading branch information
NotFounds committed Aug 27, 2021
1 parent 7472844 commit 6c74b61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion collections/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ console.assert(
### single

Returns the only element in the given collection matching the given predicate.
Returns undefined if there is none.
Returns undefined if there is none or multiple matches for the predicate.

```ts
import { single } from "https://deno.land/std@$STD_VERSION/collections/mod.ts";
Expand Down
2 changes: 1 addition & 1 deletion collections/single.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.

/**
* Returns the only element in the given collection matching the given predicate. Returns undefined if there is none.
* Returns the only element in the given collection matching the given predicate. Returns undefined if there is none or multiple matches for the predicate.
*
* Example:
*
Expand Down

0 comments on commit 6c74b61

Please sign in to comment.