Latest
function sampleSize
import { sampleSize } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/collection.js";

Gets n random elements at unique keys from collection up to the size of collection.

Examples

_.sampleSize([1, 2, 3], 2); // => [3, 1]

_.sampleSize([1, 2, 3], 4); // => [2, 3, 1]

Parameters

collection

The collection to sample.

n
guard