diff --git a/collections/README.md b/collections/README.md index 16b4b7d5c82f..52e85d654dae 100644 --- a/collections/README.md +++ b/collections/README.md @@ -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"; diff --git a/collections/single.ts b/collections/single.ts index 78438cef89ee..fb037a2232c1 100644 --- a/collections/single.ts +++ b/collections/single.ts @@ -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: *