Skip to content

Commit

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

### single

Returns the only element in the given collection matching the given predicate.
Returns undefined if there is none or multiple matches for the predicate.
Returns an element if and only if that element is the only one matching the
given condition. Returns `undefined` otherwise.

```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 or multiple matches for the predicate.
* Returns an element if and only if that element is the only one matching the given condition. Returns `undefined` otherwise.
*
* Example:
*
Expand Down

0 comments on commit 1fa2dbb

Please sign in to comment.