Skip to content

Commit a174158

Browse files
committed
Auto-generated commit
1 parent bdafa6d commit a174158

File tree

13 files changed

+26
-17
lines changed

13 files changed

+26
-17
lines changed

.github/workflows/productionize.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ jobs:
348348
349349
# Send status to Slack channel if job fails:
350350
- name: 'Send status to Slack channel in case of failure'
351-
uses: act10ns/slack@v1
351+
uses: act10ns/slack@v2
352352
with:
353353
status: ${{ job.status }}
354354
steps: ${{ toJson(steps) }}
@@ -518,7 +518,7 @@ jobs:
518518
519519
# Send status to Slack channel if job fails:
520520
- name: 'Send status to Slack channel in case of failure'
521-
uses: act10ns/slack@v1
521+
uses: act10ns/slack@v2
522522
with:
523523
status: ${{ job.status }}
524524
steps: ${{ toJson(steps) }}
@@ -694,7 +694,7 @@ jobs:
694694
695695
# Send status to Slack channel if job fails:
696696
- name: 'Send status to Slack channel in case of failure'
697-
uses: act10ns/slack@v1
697+
uses: act10ns/slack@v2
698698
with:
699699
status: ${{ job.status }}
700700
steps: ${{ toJson(steps) }}
@@ -886,7 +886,7 @@ jobs:
886886
887887
# Send status to Slack channel if job fails:
888888
- name: 'Send status to Slack channel in case of failure'
889-
uses: act10ns/slack@v1
889+
uses: act10ns/slack@v2
890890
with:
891891
status: ${{ job.status }}
892892
steps: ${{ toJson(steps) }}

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
210210
# Send status to Slack channel if job fails:
211211
- name: 'Send status to Slack channel in case of failure'
212-
uses: act10ns/slack@v1
212+
uses: act10ns/slack@v2
213213
with:
214214
status: ${{ job.status }}
215215
steps: ${{ toJson(steps) }}

.github/workflows/publish_cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
133133
# Send status to Slack channel if job fails:
134134
- name: 'Send status to Slack channel in case of failure'
135-
uses: act10ns/slack@v1
135+
uses: act10ns/slack@v2
136136
with:
137137
status: ${{ job.status }}
138138
steps: ${{ toJson(steps) }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
9090
# Send status to Slack channel if job fails:
9191
- name: 'Send status to Slack channel in case of failure'
92-
uses: act10ns/slack@v1
92+
uses: act10ns/slack@v2
9393
with:
9494
status: ${{ job.status }}
9595
steps: ${{ toJson(steps) }}

.github/workflows/test_bundles.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
8989
# Send notification to Slack channel if job fails:
9090
- name: 'Send status to Slack channel in case of failure'
91-
uses: act10ns/slack@v1
91+
uses: act10ns/slack@v2
9292
with:
9393
status: ${{ job.status }}
9494
steps: ${{ toJson(steps) }}
@@ -130,7 +130,7 @@ jobs:
130130
131131
# Send notification to Slack channel if job fails:
132132
- name: 'Send status to Slack channel in case of failure'
133-
uses: act10ns/slack@v1
133+
uses: act10ns/slack@v2
134134
with:
135135
status: ${{ job.status }}
136136
steps: ${{ toJson(steps) }}
@@ -172,7 +172,7 @@ jobs:
172172
173173
# Send notification to Slack channel if job fails:
174174
- name: 'Send status to Slack channel in case of failure'
175-
uses: act10ns/slack@v1
175+
uses: act10ns/slack@v2
176176
with:
177177
status: ${{ job.status }}
178178
steps: ${{ toJson(steps) }}

.github/workflows/test_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
107107
# Send Slack notification if job fails:
108108
- name: 'Send status to Slack channel in case of failure'
109-
uses: act10ns/slack@v1
109+
uses: act10ns/slack@v2
110110
with:
111111
status: ${{ job.status }}
112112
steps: ${{ toJson(steps) }}

.github/workflows/test_install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
# Send Slack notification if job fails:
7777
- name: 'Send notification to Slack in case of failure'
78-
uses: act10ns/slack@v1
78+
uses: act10ns/slack@v2
7979
with:
8080
status: ${{ job.status }}
8181
steps: ${{ toJson(steps) }}

lib/factory.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
// MODULES //
2222

2323
var isPositive = require( '@stdlib/assert-is-positive-number' ).isPrimitive;
24+
var isPlainObject = require( '@stdlib/assert-is-plain-object' );
2425
var assign = require( '@stdlib/object-assign' );
26+
var format = require( '@stdlib/string-format' );
2527
var RandomStream = require( './main.js' );
2628

2729

@@ -42,6 +44,7 @@ var RandomStream = require( './main.js' );
4244
* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state
4345
* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state
4446
* @param {PositiveInteger} [options.siter] - number of iterations after which to emit the PRNG state
47+
* @throws {TypeError} options argument must be an object
4548
* @returns {Function} stream factory
4649
*
4750
* @example
@@ -68,13 +71,19 @@ function factory( sigma, options ) {
6871

6972
nargs = arguments.length;
7073
if ( nargs > 1 ) {
74+
if ( !isPlainObject( options ) ) {
75+
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
76+
}
7177
fcn = createStream2;
7278
opts = assign( {}, options );
7379
} else if ( nargs === 1 ) {
7480
if ( isPositive( sigma ) ) {
7581
fcn = createStream2;
7682
opts = {};
7783
} else {
84+
if ( !isPlainObject( sigma ) ) {
85+
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', sigma ) );
86+
}
7887
opts = assign( {}, sigma );
7988
fcn = createStream1;
8089
}

test/test.factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var factory = require( './../lib/factory.js' );
3131

3232
tape( 'main export is a function', function test( t ) {
3333
t.ok( true, __filename );
34-
t.equal( typeof factory, 'function', 'main export is a function' );
34+
t.strictEqual( typeof factory, 'function', 'main export is a function' );
3535
t.end();
3636
});
3737

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var randomStream = require( './../lib' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( typeof randomStream, 'function', 'main export is a function' );
31+
t.strictEqual( typeof randomStream, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

0 commit comments

Comments
 (0)