@stdlib/random-streams-normal 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +6 -3
- package/SECURITY.md +5 -0
- package/docs/types/index.d.ts +16 -16
- package/package.json +27 -39
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -523,7 +523,7 @@ See [LICENSE][stdlib-license].
|
|
|
523
523
|
|
|
524
524
|
## Copyright
|
|
525
525
|
|
|
526
|
-
Copyright © 2016-
|
|
526
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
527
527
|
|
|
528
528
|
</section>
|
|
529
529
|
|
|
@@ -538,8 +538,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
538
538
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/random-streams-normal.svg
|
|
539
539
|
[npm-url]: https://npmjs.org/package/@stdlib/random-streams-normal
|
|
540
540
|
|
|
541
|
-
[test-image]: https://github.com/stdlib-js/random-streams-normal/actions/workflows/test.yml/badge.svg?branch=v0.1
|
|
542
|
-
[test-url]: https://github.com/stdlib-js/random-streams-normal/actions/workflows/test.yml?query=branch:v0.1
|
|
541
|
+
[test-image]: https://github.com/stdlib-js/random-streams-normal/actions/workflows/test.yml/badge.svg?branch=v0.2.1
|
|
542
|
+
[test-url]: https://github.com/stdlib-js/random-streams-normal/actions/workflows/test.yml?query=branch:v0.2.1
|
|
543
543
|
|
|
544
544
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-streams-normal/main.svg
|
|
545
545
|
[coverage-url]: https://codecov.io/github/stdlib-js/random-streams-normal?branch=main
|
|
@@ -566,8 +566,11 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
566
566
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
567
567
|
|
|
568
568
|
[deno-url]: https://github.com/stdlib-js/random-streams-normal/tree/deno
|
|
569
|
+
[deno-readme]: https://github.com/stdlib-js/random-streams-normal/blob/deno/README.md
|
|
569
570
|
[umd-url]: https://github.com/stdlib-js/random-streams-normal/tree/umd
|
|
571
|
+
[umd-readme]: https://github.com/stdlib-js/random-streams-normal/blob/umd/README.md
|
|
570
572
|
[esm-url]: https://github.com/stdlib-js/random-streams-normal/tree/esm
|
|
573
|
+
[esm-readme]: https://github.com/stdlib-js/random-streams-normal/blob/esm/README.md
|
|
571
574
|
[branches-url]: https://github.com/stdlib-js/random-streams-normal/blob/main/branches.md
|
|
572
575
|
|
|
573
576
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/random-streams-normal/main/LICENSE
|
package/SECURITY.md
ADDED
package/docs/types/index.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ declare class RandomStream extends Readable {
|
|
|
95
95
|
* @returns stream instance
|
|
96
96
|
*
|
|
97
97
|
* @example
|
|
98
|
-
* var inspectStream = require(
|
|
98
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
99
99
|
*
|
|
100
100
|
* function log( chunk ) {
|
|
101
101
|
* console.log( chunk.toString() );
|
|
@@ -114,37 +114,37 @@ declare class RandomStream extends Readable {
|
|
|
114
114
|
/**
|
|
115
115
|
* Destruction state.
|
|
116
116
|
*/
|
|
117
|
-
private readonly _destroyed: boolean;
|
|
117
|
+
private readonly _destroyed: boolean;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Flag indicating whether a stream is operating in object mode.
|
|
121
121
|
*/
|
|
122
|
-
private readonly _objectMode: boolean;
|
|
122
|
+
private readonly _objectMode: boolean;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* Data separator.
|
|
126
126
|
*/
|
|
127
|
-
private readonly _sep: string;
|
|
127
|
+
private readonly _sep: string;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Total number of iterations.
|
|
131
131
|
*/
|
|
132
|
-
private readonly _iter: number;
|
|
132
|
+
private readonly _iter: number;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Number of iterations after which to emit the underlying PRNG state.
|
|
136
136
|
*/
|
|
137
|
-
private readonly _siter: number;
|
|
137
|
+
private readonly _siter: number;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Iteration counter.
|
|
141
141
|
*/
|
|
142
|
-
private _i: number;
|
|
142
|
+
private _i: number;
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
145
|
* Pseudorandom number generator for generating normally distributed pseudorandom numbers.
|
|
146
146
|
*/
|
|
147
|
-
private readonly _prng: random.PRNG;
|
|
147
|
+
private readonly _prng: random.PRNG;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Underlying PRNG.
|
|
@@ -181,7 +181,7 @@ declare class RandomStream extends Readable {
|
|
|
181
181
|
*
|
|
182
182
|
* @param size - number (of bytes) to read
|
|
183
183
|
*/
|
|
184
|
-
_read( size: number ): void;
|
|
184
|
+
_read( size: number ): void;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Gracefully destroys a stream, providing backward compatibility.
|
|
@@ -215,7 +215,7 @@ interface Constructor {
|
|
|
215
215
|
* @returns stream instance
|
|
216
216
|
*
|
|
217
217
|
* @example
|
|
218
|
-
* var inspectStream = require(
|
|
218
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
219
219
|
*
|
|
220
220
|
* function log( chunk ) {
|
|
221
221
|
* console.log( chunk.toString() );
|
|
@@ -243,7 +243,7 @@ interface Constructor {
|
|
|
243
243
|
* @returns stream instance
|
|
244
244
|
*
|
|
245
245
|
* @example
|
|
246
|
-
* var inspectStream = require(
|
|
246
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
247
247
|
*
|
|
248
248
|
* function log( chunk ) {
|
|
249
249
|
* console.log( chunk.toString() );
|
|
@@ -284,7 +284,7 @@ interface Constructor {
|
|
|
284
284
|
* streams.push( createStream() );
|
|
285
285
|
* }
|
|
286
286
|
*/
|
|
287
|
-
factory( mu: number, sigma: number, options?: Options ): ( ...args: Array<any> ) => RandomStream;
|
|
287
|
+
factory( mu: number, sigma: number, options?: Options ): ( ...args: Array<any> ) => RandomStream;
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
290
|
* Returns a function for creating readable streams which generate pseudorandom numbers drawn from a normal distribution.
|
|
@@ -323,7 +323,7 @@ interface Constructor {
|
|
|
323
323
|
* @returns stream instance
|
|
324
324
|
*
|
|
325
325
|
* @example
|
|
326
|
-
* var inspectStream = require(
|
|
326
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
327
327
|
*
|
|
328
328
|
* function log( v ) {
|
|
329
329
|
* console.log( v );
|
|
@@ -352,7 +352,7 @@ interface Constructor {
|
|
|
352
352
|
* @returns stream instance
|
|
353
353
|
*
|
|
354
354
|
* @example
|
|
355
|
-
* var inspectStream = require(
|
|
355
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
356
356
|
*
|
|
357
357
|
* function log( chunk ) {
|
|
358
358
|
* console.log( chunk.toString() );
|
|
@@ -367,7 +367,7 @@ interface Constructor {
|
|
|
367
367
|
* stream.pipe( inspectStream( log ) );
|
|
368
368
|
*
|
|
369
369
|
* @example
|
|
370
|
-
* var inspectStream = require(
|
|
370
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
371
371
|
*
|
|
372
372
|
* function log( chunk ) {
|
|
373
373
|
* console.log( chunk.toString() );
|
|
@@ -383,7 +383,7 @@ interface Constructor {
|
|
|
383
383
|
* stream.pipe( inspectStream( log ) );
|
|
384
384
|
*
|
|
385
385
|
* @example
|
|
386
|
-
* var inspectStream = require(
|
|
386
|
+
* var inspectStream = require( '@stdlib/streams-node-inspect-sink' );
|
|
387
387
|
*
|
|
388
388
|
* function log( v ) {
|
|
389
389
|
* console.log( v );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/random-streams-normal",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Create a readable stream for generating pseudorandom numbers drawn from a normal distribution.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -15,19 +15,12 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "./lib",
|
|
17
17
|
"directories": {
|
|
18
|
-
"benchmark": "./benchmark",
|
|
19
18
|
"doc": "./docs",
|
|
20
|
-
"example": "./examples",
|
|
21
19
|
"lib": "./lib",
|
|
22
|
-
"
|
|
20
|
+
"dist": "./dist"
|
|
23
21
|
},
|
|
24
22
|
"types": "./docs/types",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"test": "make test",
|
|
27
|
-
"test-cov": "make test-cov",
|
|
28
|
-
"examples": "make examples",
|
|
29
|
-
"benchmark": "make benchmark"
|
|
30
|
-
},
|
|
23
|
+
"scripts": {},
|
|
31
24
|
"homepage": "https://stdlib.io",
|
|
32
25
|
"repository": {
|
|
33
26
|
"type": "git",
|
|
@@ -37,37 +30,32 @@
|
|
|
37
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
31
|
},
|
|
39
32
|
"dependencies": {
|
|
40
|
-
"@stdlib/assert-has-own-property": "^0.1
|
|
41
|
-
"@stdlib/assert-is-boolean": "^0.1
|
|
42
|
-
"@stdlib/assert-is-error": "^0.1
|
|
43
|
-
"@stdlib/assert-is-nonnegative-integer": "^0.1
|
|
44
|
-
"@stdlib/assert-is-nonnegative-number": "^0.1
|
|
45
|
-
"@stdlib/assert-is-number": "^0.1
|
|
46
|
-
"@stdlib/assert-is-plain-object": "^0.1
|
|
47
|
-
"@stdlib/assert-is-positive-integer": "^0.1
|
|
48
|
-
"@stdlib/assert-is-positive-number": "^0.1
|
|
49
|
-
"@stdlib/assert-is-string": "^0.1
|
|
50
|
-
"@stdlib/buffer-from-string": "^0.1
|
|
51
|
-
"@stdlib/math-base-assert-is-nan": "^0.1
|
|
52
|
-
"@stdlib/object-assign": "^0.1
|
|
53
|
-
"@stdlib/random-base-normal": "^0.1
|
|
54
|
-
"@stdlib/string-format": "^0.1
|
|
55
|
-
"@stdlib/utils-define-nonenumerable-property": "^0.1
|
|
56
|
-
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.1
|
|
57
|
-
"@stdlib/utils-define-read-only-accessor": "^0.1
|
|
58
|
-
"@stdlib/utils-define-read-write-accessor": "^0.1
|
|
59
|
-
"@stdlib/utils-inherit": "^0.1
|
|
60
|
-
"@stdlib/utils-next-tick": "^0.1
|
|
33
|
+
"@stdlib/assert-has-own-property": "^0.2.1",
|
|
34
|
+
"@stdlib/assert-is-boolean": "^0.2.1",
|
|
35
|
+
"@stdlib/assert-is-error": "^0.2.1",
|
|
36
|
+
"@stdlib/assert-is-nonnegative-integer": "^0.2.1",
|
|
37
|
+
"@stdlib/assert-is-nonnegative-number": "^0.2.1",
|
|
38
|
+
"@stdlib/assert-is-number": "^0.2.1",
|
|
39
|
+
"@stdlib/assert-is-plain-object": "^0.2.1",
|
|
40
|
+
"@stdlib/assert-is-positive-integer": "^0.2.1",
|
|
41
|
+
"@stdlib/assert-is-positive-number": "^0.2.1",
|
|
42
|
+
"@stdlib/assert-is-string": "^0.2.1",
|
|
43
|
+
"@stdlib/buffer-from-string": "^0.2.1",
|
|
44
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.1",
|
|
45
|
+
"@stdlib/object-assign": "^0.2.1",
|
|
46
|
+
"@stdlib/random-base-normal": "^0.2.1",
|
|
47
|
+
"@stdlib/string-format": "^0.2.1",
|
|
48
|
+
"@stdlib/utils-define-nonenumerable-property": "^0.2.1",
|
|
49
|
+
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1",
|
|
50
|
+
"@stdlib/utils-define-read-only-accessor": "^0.2.1",
|
|
51
|
+
"@stdlib/utils-define-read-write-accessor": "^0.2.1",
|
|
52
|
+
"@stdlib/utils-inherit": "^0.2.1",
|
|
53
|
+
"@stdlib/utils-next-tick": "^0.2.1",
|
|
61
54
|
"debug": "^2.6.9",
|
|
62
|
-
"readable-stream": "^2.1.4"
|
|
63
|
-
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"@stdlib/streams-node-inspect-sink": "^0.1.0",
|
|
66
|
-
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
67
|
-
"proxyquire": "^2.0.0",
|
|
68
|
-
"istanbul": "^0.4.1",
|
|
69
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
55
|
+
"readable-stream": "^2.1.4",
|
|
56
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.2.1"
|
|
70
57
|
},
|
|
58
|
+
"devDependencies": {},
|
|
71
59
|
"engines": {
|
|
72
60
|
"node": ">=0.10.0",
|
|
73
61
|
"npm": ">2.7.0"
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
title: stdlib
|
|
3
|
-
message: >-
|
|
4
|
-
If you use this software, please cite it using the
|
|
5
|
-
metadata from this file.
|
|
6
|
-
|
|
7
|
-
type: software
|
|
8
|
-
|
|
9
|
-
authors:
|
|
10
|
-
- name: The Stdlib Authors
|
|
11
|
-
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
-
|
|
13
|
-
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
-
url: https://stdlib.io
|
|
15
|
-
|
|
16
|
-
abstract: |
|
|
17
|
-
Standard library for JavaScript and Node.js.
|
|
18
|
-
|
|
19
|
-
keywords:
|
|
20
|
-
- JavaScript
|
|
21
|
-
- Node.js
|
|
22
|
-
- TypeScript
|
|
23
|
-
- standard library
|
|
24
|
-
- scientific computing
|
|
25
|
-
- numerical computing
|
|
26
|
-
- statistical computing
|
|
27
|
-
|
|
28
|
-
license: Apache-2.0 AND BSL-1.0
|
|
29
|
-
|
|
30
|
-
date-released: 2016
|