Skip to content

Commit e1336ed

Browse files
committed
Auto-generated commit
1 parent 50e1915 commit e1336ed

5 files changed

Lines changed: 25 additions & 137 deletions

File tree

.github/.keepalive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-11-01T06:20:45.369Z

.github/workflows/publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
3737
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3838
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3939
rei2hu <reimu@reimu.ws>
40+
Robert Gislason <gztown2216@yahoo.com>

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
"@stdlib/assert-is-positive-integer": "^0.1.0",
4545
"@stdlib/assert-is-probability": "^0.1.1",
4646
"@stdlib/math-base-assert-is-nan": "^0.1.1",
47-
"@stdlib/math-base-assert-is-positive-integer": "^0.1.0",
47+
"@stdlib/math-base-assert-is-positive-integer": "^0.1.1",
4848
"@stdlib/math-base-assert-is-probability": "^0.1.1",
49-
"@stdlib/math-base-special-abs": "^0.1.0",
50-
"@stdlib/math-base-special-floor": "^0.1.0",
51-
"@stdlib/math-base-special-ln": "^0.1.0",
49+
"@stdlib/math-base-special-abs": "^0.1.1",
50+
"@stdlib/math-base-special-floor": "^0.1.1",
51+
"@stdlib/math-base-special-ln": "^0.1.1",
5252
"@stdlib/math-base-special-pow": "^0.1.0",
53-
"@stdlib/math-base-special-signum": "^0.1.0",
54-
"@stdlib/math-base-special-sqrt": "^0.1.0",
53+
"@stdlib/math-base-special-signum": "^0.1.1",
54+
"@stdlib/math-base-special-sqrt": "^0.1.1",
5555
"@stdlib/random-base-mt19937": "^0.1.0",
5656
"@stdlib/string-format": "^0.1.1",
5757
"@stdlib/types": "^0.1.0",
@@ -62,12 +62,12 @@
6262
"@stdlib/utils-noop": "^0.1.1"
6363
},
6464
"devDependencies": {
65-
"@stdlib/array-uint32": "^0.1.0",
65+
"@stdlib/array-uint32": "^0.1.1",
6666
"@stdlib/assert-is-uint32array": "^0.1.1",
6767
"@stdlib/bench": "^0.1.0",
6868
"@stdlib/constants-uint32-max": "^0.1.1",
69-
"@stdlib/math-base-assert-is-nonnegative-integer": "^0.1.0",
70-
"@stdlib/math-base-special-ceil": "^0.1.0",
69+
"@stdlib/math-base-assert-is-nonnegative-integer": "^0.1.1",
70+
"@stdlib/math-base-special-ceil": "^0.1.1",
7171
"@stdlib/math-base-special-round": "^0.1.1",
7272
"@stdlib/process-env": "^0.1.1",
7373
"@stdlib/random-base-minstd": "^0.1.0",

test/dist/test.js

Lines changed: 4 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,135 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var uniform = require( '@stdlib/random-base-uniform' ).factory;
25-
var round = require( '@stdlib/math-base-special-round' );
26-
var isNonNegativeInteger = require( '@stdlib/math-base-assert-is-nonnegative-integer' );
27-
var isUint32Array = require( '@stdlib/assert-is-uint32array' );
28-
var binomial = require( './../../dist' );
24+
var main = require( './../../dist' );
2925

3026

3127
// TESTS //
3228

33-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
3430
t.ok( true, __filename );
35-
t.strictEqual( typeof binomial, 'function', 'main export is a function' );
36-
t.end();
37-
});
38-
39-
tape( 'attached to the main export is a method to generate pseudorandom number generators', function test( t ) {
40-
t.equal( typeof binomial.factory, 'function', 'has method' );
41-
t.end();
42-
});
43-
44-
tape( 'attached to the main export is a method to serialize a pseudorandom number generator as JSON', function test( t ) {
45-
t.equal( typeof binomial.toJSON, 'function', 'has method' );
46-
t.end();
47-
});
48-
49-
tape( 'attached to the main export is the generator name', function test( t ) {
50-
t.equal( binomial.NAME, 'binomial', 'has property' );
51-
t.end();
52-
});
53-
54-
tape( 'attached to the main export is the underlying PRNG', function test( t ) {
55-
t.equal( typeof binomial.PRNG, 'function', 'has property' );
56-
t.end();
57-
});
58-
59-
tape( 'attached to the main export is the generator seed', function test( t ) {
60-
t.equal( isUint32Array( binomial.seed ), true, 'has property' );
61-
t.end();
62-
});
63-
64-
tape( 'attached to the main export is the generator seed length', function test( t ) {
65-
t.equal( typeof binomial.seedLength, 'number', 'has property' );
66-
t.end();
67-
});
68-
69-
tape( 'attached to the main export is the generator state', function test( t ) {
70-
t.equal( isUint32Array( binomial.state ), true, 'has property' );
71-
t.end();
72-
});
73-
74-
tape( 'attached to the main export is the generator state length', function test( t ) {
75-
t.equal( typeof binomial.stateLength, 'number', 'has property' );
76-
t.end();
77-
});
78-
79-
tape( 'attached to the main export is the generator state size', function test( t ) {
80-
t.equal( typeof binomial.byteLength, 'number', 'has property' );
81-
t.end();
82-
});
83-
84-
tape( 'the function returns pseudorandom numbers', function test( t ) {
85-
var rand;
86-
var n;
87-
var p;
88-
var r;
89-
var i;
90-
91-
rand = uniform({
92-
'seed': 3893
93-
});
94-
for ( i = 0; i < 1e2; i++ ) {
95-
n = round( rand( 1.0, 100 ) );
96-
p = rand( 0.0, 1.0 );
97-
r = binomial( n, p );
98-
t.strictEqual( isNonNegativeInteger( r ), true, 'Binomial('+n+','+p+') => '+r );
99-
}
100-
t.end();
101-
});
102-
103-
tape( 'the function supports setting the generator state', function test( t ) {
104-
var state;
105-
var arr;
106-
var i;
107-
108-
// Move to a future state...
109-
for ( i = 0; i < 100; i++ ) {
110-
binomial( 20, 0.67 );
111-
}
112-
// Capture the current state:
113-
state = binomial.state;
114-
115-
// Move to a future state...
116-
arr = [];
117-
for ( i = 0; i < 100; i++ ) {
118-
arr.push( binomial( 20, 0.67 ) );
119-
}
120-
// Set the state:
121-
binomial.state = state;
122-
123-
// Replay previously generated values...
124-
for ( i = 0; i < 100; i++ ) {
125-
t.equal( binomial( 20, 0.67 ), arr[ i ], 'returns expected value. i: '+i+'.' );
126-
}
127-
t.end();
128-
});
129-
130-
tape( 'the function supports setting the generator state', function test( t ) {
131-
var state;
132-
var arr;
133-
var i;
134-
135-
// Move to a future state...
136-
for ( i = 0; i < 100; i++ ) {
137-
binomial( 8, 0.39 );
138-
}
139-
// Capture the current state:
140-
state = binomial.state;
141-
142-
// Move to a future state...
143-
arr = [];
144-
for ( i = 0; i < 100; i++ ) {
145-
arr.push( binomial( 8, 0.39 ) );
146-
}
147-
// Set the state:
148-
binomial.state = state;
149-
150-
// Replay previously generated values...
151-
for ( i = 0; i < 100; i++ ) {
152-
t.equal( binomial( 8, 0.39 ), arr[ i ], 'returns expected value. i: '+i+'.' );
153-
}
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
15432
t.end();
15533
});

0 commit comments

Comments
 (0)