@types/secure-sample
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Installation

npm install --save @types/secure-sample

Summary

This package contains type definitions for secure-sample (https://github.com/emilbayes/secure-sample).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/secure-sample.

index.d.ts

export = secureSample;

/**
 * Will return an array with `sampleSize` number of unique samples from the uniform
 * distribution `[0, populationSize)` (`populationSize` exclusive). The samples
 * will be sequential, so you may want to shuffle them.
 *
 * `sampleSize` and `populationSize` must be safe integers. `sampleSize` must not be
 * larger than `populationSize`. If any of these conditions are violated, an error
 * will be thrown.
 *
 * @example
 * import sample = require('secure-sample')
 * import shuffle = require('secure-shuffle')
 *
 * shuffle(sample(3, 10)) // [6, 2, 8]
 */
declare function secureSample(sampleSize: number, populationSize: number): number[];

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/secure-sample

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

3.94 kB

Total Files

5

Last publish

Collaborators

  • types