Skip to content

Commit 4828ae3

Browse files
committed
Auto-generated commit
1 parent 8717523 commit 4828ae3

File tree

5 files changed

+18
-99
lines changed

5 files changed

+18
-99
lines changed

.github/.keepalive

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

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@stdlib/assert-is-number": "^0.1.1",
4545
"@stdlib/assert-is-plain-object": "^0.1.1",
4646
"@stdlib/math-base-assert-is-nan": "^0.1.1",
47-
"@stdlib/math-base-special-sqrt": "^0.1.0",
47+
"@stdlib/math-base-special-sqrt": "^0.1.1",
4848
"@stdlib/random-base-mt19937": "^0.1.0",
4949
"@stdlib/string-format": "^0.1.1",
5050
"@stdlib/types": "^0.1.0",
@@ -55,7 +55,7 @@
5555
"@stdlib/utils-noop": "^0.1.1"
5656
},
5757
"devDependencies": {
58-
"@stdlib/array-uint32": "^0.1.0",
58+
"@stdlib/array-uint32": "^0.1.1",
5959
"@stdlib/assert-is-uint32array": "^0.1.1",
6060
"@stdlib/bench": "^0.1.0",
6161
"@stdlib/constants-uint32-max": "^0.1.1",

test/dist/test.js

Lines changed: 4 additions & 95 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,104 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var isUint32Array = require( '@stdlib/assert-is-uint32array' );
25-
var triangular = require( './../../dist' );
24+
var main = require( './../../dist' );
2625

2726

2827
// TESTS //
2928

30-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
3130
t.ok( true, __filename );
32-
t.strictEqual( typeof triangular, 'function', 'main export is a function' );
33-
t.end();
34-
});
35-
36-
tape( 'attached to the main export is a method to generate pseudorandom number generators', function test( t ) {
37-
t.equal( typeof triangular.factory, 'function', 'has method' );
38-
t.end();
39-
});
40-
41-
tape( 'attached to the main export is a method to serialize a pseudorandom number generator as JSON', function test( t ) {
42-
t.equal( typeof triangular.toJSON, 'function', 'has method' );
43-
t.end();
44-
});
45-
46-
tape( 'attached to the main export is the generator name', function test( t ) {
47-
t.equal( triangular.NAME, 'triangular', 'has property' );
48-
t.end();
49-
});
50-
51-
tape( 'attached to the main export is the underlying PRNG', function test( t ) {
52-
t.equal( typeof triangular.PRNG, 'function', 'has property' );
53-
t.end();
54-
});
55-
56-
tape( 'attached to the main export is the generator seed', function test( t ) {
57-
t.equal( isUint32Array( triangular.seed ), true, 'has property' );
58-
t.end();
59-
});
60-
61-
tape( 'attached to the main export is the generator seed length', function test( t ) {
62-
t.equal( typeof triangular.seedLength, 'number', 'has property' );
63-
t.end();
64-
});
65-
66-
tape( 'attached to the main export is the generator state', function test( t ) {
67-
t.equal( isUint32Array( triangular.state ), true, 'has property' );
68-
t.end();
69-
});
70-
71-
tape( 'attached to the main export is the generator state length', function test( t ) {
72-
t.equal( typeof triangular.stateLength, 'number', 'has property' );
73-
t.end();
74-
});
75-
76-
tape( 'attached to the main export is the generator state size', function test( t ) {
77-
t.equal( typeof triangular.byteLength, 'number', 'has property' );
78-
t.end();
79-
});
80-
81-
tape( 'the function returns pseudorandom numbers', function test( t ) {
82-
var r;
83-
var a;
84-
var b;
85-
var c;
86-
var i;
87-
88-
a = 200.0;
89-
b = 499.974;
90-
c = 211.33;
91-
for ( i = 0; i < 1e2; i++ ) {
92-
r = triangular( a, b, c );
93-
t.equal( typeof r, 'number', 'returns a number' );
94-
t.equal( r >= a && r <= b, true, 'within support: '+r );
95-
}
96-
t.end();
97-
});
98-
99-
tape( 'the function supports setting the generator state', function test( t ) {
100-
var state;
101-
var arr;
102-
var i;
103-
104-
// Move to a future state...
105-
for ( i = 0; i < 100; i++ ) {
106-
triangular( 0.0, 1.0, 0.5 );
107-
}
108-
// Capture the current state:
109-
state = triangular.state;
110-
111-
// Move to a future state...
112-
arr = [];
113-
for ( i = 0; i < 100; i++ ) {
114-
arr.push( triangular( 0.0, 1.0, 0.5 ) );
115-
}
116-
// Set the state:
117-
triangular.state = state;
118-
119-
// Replay previously generated values...
120-
for ( i = 0; i < 100; i++ ) {
121-
t.equal( triangular( 0.0, 1.0, 0.5 ), arr[ i ], 'returns expected value. i: '+i+'.' );
122-
}
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
12332
t.end();
12433
});

0 commit comments

Comments
 (0)