Skip to content

Commit 7c3729c

Browse files
committed
feat!: add support for additional modes
BREAKING CHANGE: rename 'throw' mode to 'strict' To migrate, users should simply update 'throw' to 'strict'.
1 parent fd71d8a commit 7c3729c

File tree

10 files changed

+181
-94
lines changed

10 files changed

+181
-94
lines changed

lib/node_modules/@stdlib/array/base/mskput/README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Replaces elements of an array with provided values according to a provided mask
3737
```javascript
3838
var x = [ 1, 2, 3, 4 ];
3939

40-
var out = mskput( x, [ 1, 0, 1, 0 ], [ 20, 40 ], 'throw' );
40+
var out = mskput( x, [ 1, 0, 1, 0 ], [ 20, 40 ], 'strict' );
4141
// returns [ 1, 20, 3, 40 ]
4242

4343
var bool = ( out === x );
@@ -49,27 +49,29 @@ The function supports the following parameters:
4949
- **x**: input array.
5050
- **mask**: mask array.
5151
- **values**: values to set.
52-
- **mode**: string specifying whether to raise an exception when the number of `values` is less than the number of falsy `mask` values.
52+
- **mode**: string specifying whether to raise an exception when the number of `values` does not equal the number of falsy `mask` values.
5353

5454
The function supports the following modes:
5555

56-
- `'throw'`: specifies that the function must raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
56+
- `'strict'`: specifies that the function must raise an exception when the number of `values` does not **exactly** equal the number of falsy `mask` values.
57+
- `'non_strict'`: specifies that the function must raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
58+
- `'strict_broadcast'`: specifies that the function must broadcast a single-element `values` array and otherwise raise an exception when the number of `values` does not **exactly** equal the number of falsy `mask` values.
5759
- `'broadcast'`: specifies that the function must broadcast a single-element `values` array and otherwise raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
5860
- `'repeat'`: specifies that the function must reuse provided `values` when replacing elements in `x` in order to satisfy the `mask` array.
5961

60-
When `mode` is equal to `'broadcast`', the function supports broadcasting a `values` array containing a single element against the number of falsy values in the `mask` array.
62+
In broadcasting modes, the function supports broadcasting a `values` array containing a single element against the number of falsy values in the `mask` array.
6163

6264
```javascript
6365
var x = [ 1, 2, 3, 4 ];
6466

65-
var out = mskput( x, [ 1, 0, 1, 0 ], [ 20 ], 'broadcast' );
67+
var out = mskput( x, [ 1, 0, 1, 0 ], [ 20 ], 'strict_broadcast' );
6668
// returns [ 1, 20, 3, 20 ]
6769

6870
var bool = ( out === x );
6971
// returns true
7072
```
7173

72-
When `mode` is equal to `repeat`, the function supports recycling elements in a `values` array to satisfy the number of falsy values in the `mask` array.
74+
In repeat mode, the function supports recycling elements in a `values` array to satisfy the number of falsy values in the `mask` array.
7375

7476
```javascript
7577
var x = [ 1, 2, 3, 4 ];
@@ -123,7 +125,7 @@ var values = filledBy( N, discreteUniform.factory( 1000, 2000 ) );
123125
console.log( values );
124126

125127
// Update a random sample of elements in `x`:
126-
var out = mskput( x, mask, values, 'throw' );
128+
var out = mskput( x, mask, values, 'non_strict' );
127129
console.log( out );
128130
```
129131

lib/node_modules/@stdlib/array/base/mskput/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bench( pkg+'::no_broadcasting:len=100', function benchmark( b ) {
4141

4242
b.tic();
4343
for ( i = 0; i < b.iterations; i++ ) {
44-
v = mskput( x, mask, x, 'throw' );
44+
v = mskput( x, mask, x, 'strict' );
4545
if ( typeof v !== 'object' ) {
4646
b.fail( 'should return an array' );
4747
}
@@ -65,7 +65,7 @@ bench( pkg+'::broadcasting:len=100', function benchmark( b ) {
6565

6666
b.tic();
6767
for ( i = 0; i < b.iterations; i++ ) {
68-
v = mskput( x, mask, [ i ], 'broadcast' );
68+
v = mskput( x, mask, [ i ], 'strict_broadcast' );
6969
if ( typeof v !== 'object' ) {
7070
b.fail( 'should return an array' );
7171
}

lib/node_modules/@stdlib/array/base/mskput/benchmark/benchmark.length.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function createBenchmark( len ) {
7171

7272
b.tic();
7373
for ( i = 0; i < b.iterations; i++ ) {
74-
v = mskput( x, mask, values[ i%values.length ], 'throw' );
74+
v = mskput( x, mask, values[ i%values.length ], 'strict' );
7575
if ( typeof v !== 'object' ) {
7676
b.fail( 'should return an array' );
7777
}

lib/node_modules/@stdlib/array/base/mskput/docs/repl.txt

+19-12
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Replaces elements of an array with provided values according to a provided
44
mask array.
55

6-
When the `mode` is `'broadcast'`, the function supports broadcasting a
7-
`values` array containing a single element against the number of falsy
8-
values in the `mask` array.
6+
In broadcasting modes, the function supports broadcasting a values array
7+
containing a single element against the number of falsy values in the mask
8+
array.
99

10-
When the `mode` is `'repeat'`, the function supports recycling elements in a
11-
`values` array to satisfy the number of falsy values in the `mask` array.
10+
In repeat mode, the function supports recycling elements in a values array
11+
to satisfy the number of falsy values in the mask array.
1212

1313
The function mutates the input array.
1414

@@ -26,12 +26,19 @@
2626
Values to set.
2727

2828
mode: string
29-
String specifying behavior when the number of values to set is less than
30-
the number of falsy mask values. The function supports the following
31-
modes:
32-
33-
- 'throw': specifies that the function must raise an exception when the
34-
function is provided insufficient values to satisfy the mask array.
29+
String specifying behavior when the number of values to set does not
30+
equal the number of falsy mask values. The function supports the
31+
following modes:
32+
33+
- 'strict': specifies that the function must raise an exception when the
34+
number of values does not *exactly* equal the number of falsy mask
35+
values.
36+
- 'non_strict': specifies that the function must raise an exception when
37+
the function is provided insufficient values to satisfy the mask array.
38+
- 'strict_broadcast': specifies that the function must broadcast a
39+
single-element values array and otherwise raise an exception when the
40+
number of values does not **exactly** equal the number of falsy mask
41+
values.
3542
- 'broadcast': specifies that the function must broadcast a single-
3643
element values array and otherwise raise an exception when the function
3744
is provided insufficient values to satisfy the mask array.
@@ -46,7 +53,7 @@
4653
Examples
4754
--------
4855
> var x = [ 1, 2, 3, 4 ];
49-
> var out = {{alias}}( x, [ 1, 0, 1, 0 ], [ 20, 40 ], 'throw' )
56+
> var out = {{alias}}( x, [ 1, 0, 1, 0 ], [ 20, 40 ], 'strict' )
5057
[ 1, 20, 3, 40 ]
5158
> var bool = ( out === x )
5259
true

lib/node_modules/@stdlib/array/base/mskput/docs/types/index.d.ts

+22-20
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,27 @@ type MaskArray = Collection | AccessorArrayLike<any>;
3434
type ValuesArray<T> = Collection<T> | AccessorArrayLike<T>;
3535

3636
/**
37-
* Mode specifying behavior when the number of values to set is less than the number of falsy values in the mask array.
37+
* Mode specifying behavior when the number of values to set does not equal the number of falsy values in the mask array.
3838
*
3939
* ## Notes
4040
*
4141
* - The function supports the following modes:
4242
*
43-
* - `'throw'`: specifies that the function must raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
44-
* - `'broadcast'`: specifies that the function must broadcast a single-element `values` array and otherwise raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
45-
* - `'repeat'`: specifies that the function must reuse provided `values` when replacing elements in `x` in order to satisfy the `mask` array.
43+
* - `'strict'`: specifies that the function must raise an exception when the number of `values` does not **exactly** equal the number of falsy `mask` values.
44+
* - `'non_strict'`: specifies that the function must raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
45+
* - `'strict_broadcast'`: specifies that the function must broadcast a single-element `values` array and otherwise raise an exception when the number of `values` does not **exactly** equal the number of falsy `mask` values.
46+
* - `'broadcast'`: specifies that the function must broadcast a single-element `values` array and otherwise raise an exception when the function is provided insufficient `values` to satisfy the `mask` array.
47+
* - `'repeat'`: specifies that the function must reuse provided `values` when replacing elements in `x` in order to satisfy the `mask` array.
4648
*/
47-
type Mode = 'throw' | 'broadcast' | 'repeat';
49+
type Mode = 'strict' | 'non_strict' | 'strict_broadcast' | 'broadcast' | 'repeat';
4850

4951
/**
5052
* Replaces elements of an array with provided values according to a provided mask array.
5153
*
5254
* @param x - input array
5355
* @param mask - mask array
5456
* @param values - values to set
55-
* @param mode - string specifying behavior when the number of values is less than the number of falsy values in the mask array
57+
* @param mode - string specifying behavior when the number of values does not equal the number of falsy values in the mask array
5658
* @returns input array
5759
*
5860
* @example
@@ -63,7 +65,7 @@ type Mode = 'throw' | 'broadcast' | 'repeat';
6365
* var mask = [ 1, 0, 0, 1 ];
6466
* var values = [ 20, 30 ];
6567
*
66-
* var out = mskput( x, mask, values, 'throw' );
68+
* var out = mskput( x, mask, values, 'strict' );
6769
* // returns <Int32Array>[ 1, 20, 30, 4 ]
6870
*
6971
* var bool = ( out === x );
@@ -74,7 +76,7 @@ type Mode = 'throw' | 'broadcast' | 'repeat';
7476
*
7577
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
7678
*
77-
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'broadcast' );
79+
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'strict_broadcast' );
7880
* // returns <Int32Array>[ 1, 30, 30, 4 ]
7981
*
8082
* var bool = ( out === x );
@@ -88,7 +90,7 @@ declare function mskput<T extends TypedArray | BooleanTypedArray, U = unknown>(
8890
* @param x - input array
8991
* @param mask - mask array
9092
* @param values - values to set
91-
* @param mode - string specifying behavior when the number of values is less than the number of falsy values in the mask array
93+
* @param mode - string specifying behavior when the number of values does not equal the number of falsy values in the mask array
9294
* @returns input array
9395
*
9496
* @example
@@ -99,7 +101,7 @@ declare function mskput<T extends TypedArray | BooleanTypedArray, U = unknown>(
99101
* var mask = [ 1, 0, 0, 1 ];
100102
* var values = new Complex128Array( [ 20.0, 30.0, 40, 5.0 ] );
101103
*
102-
* var out = mskput( x, mask, values, 'throw' );
104+
* var out = mskput( x, mask, values, 'strict' );
103105
* // returns <Complex128Array>
104106
*
105107
* var bool = ( out === x );
@@ -113,7 +115,7 @@ declare function mskput<T extends TypedArray | BooleanTypedArray, U = unknown>(
113115
* var mask = [ 1, 0, 0, 1 ];
114116
* var values = new Complex128Array( [ 20.0, 30.0 ] );
115117
*
116-
* var out = mskput( x, mask, values, 'broadcast' );
118+
* var out = mskput( x, mask, values, 'strict_broadcast' );
117119
* // returns <Complex128Array>
118120
*
119121
* var bool = ( out === x );
@@ -127,7 +129,7 @@ declare function mskput<T extends ComplexTypedArray>( x: T, mask: MaskArray, val
127129
* @param x - input array
128130
* @param mask - mask array
129131
* @param values - values to set
130-
* @param mode - string specifying behavior when the number of values is less than the number of falsy values in the mask array
132+
* @param mode - string specifying behavior when the number of values does not equal the number of falsy values in the mask array
131133
* @returns input array
132134
*
133135
* @example
@@ -136,7 +138,7 @@ declare function mskput<T extends ComplexTypedArray>( x: T, mask: MaskArray, val
136138
* var mask = [ 1, 0, 0, 1 ];
137139
* var values = [ 20, 30 ];
138140
*
139-
* var out = mskput( x, mask, values, 'throw' );
141+
* var out = mskput( x, mask, values, 'strict' );
140142
* // returns [ 1, 20, 30, 4 ]
141143
*
142144
* var bool = ( out === x );
@@ -145,7 +147,7 @@ declare function mskput<T extends ComplexTypedArray>( x: T, mask: MaskArray, val
145147
* @example
146148
* var x = [ 1, 2, 3, 4 ];
147149
*
148-
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'broadcast' );
150+
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'strict_broadcast' );
149151
* // returns [ 1, 30, 30, 4 ]
150152
*
151153
* var bool = ( out === x );
@@ -159,7 +161,7 @@ declare function mskput<T = unknown, U = unknown>( x: Array<T>, mask: MaskArray,
159161
* @param x - input array
160162
* @param mask - mask array
161163
* @param values - values to set
162-
* @param mode - string specifying behavior when the number of values is less than the number of falsy values in the mask array
164+
* @param mode - string specifying behavior when the number of values does not equal the number of falsy values in the mask array
163165
* @returns input array
164166
*
165167
* @example
@@ -170,7 +172,7 @@ declare function mskput<T = unknown, U = unknown>( x: Array<T>, mask: MaskArray,
170172
* var mask = [ 1, 0, 0, 1 ];
171173
* var values = [ 20, 30 ];
172174
*
173-
* var out = mskput( x, mask, values, 'throw' );
175+
* var out = mskput( x, mask, values, 'strict' );
174176
*
175177
* var bool = ( out === x );
176178
* // returns true
@@ -180,7 +182,7 @@ declare function mskput<T = unknown, U = unknown>( x: Array<T>, mask: MaskArray,
180182
*
181183
* var x = toAccessorArray( [ 1, 2, 3, 4 ] );
182184
*
183-
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'broadcast' );
185+
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'strict_broadcast' );
184186
*
185187
* var bool = ( out === x );
186188
* // returns true
@@ -193,7 +195,7 @@ declare function mskput<T = unknown, U = unknown>( x: AccessorArrayLike<T>, mask
193195
* @param x - input array
194196
* @param mask - mask array
195197
* @param values - values to set
196-
* @param mode - string specifying behavior when the number of values is less than the number of falsy values in the mask array
198+
* @param mode - string specifying behavior when the number of values does not equal the number of falsy values in the mask array
197199
* @returns input array
198200
*
199201
* @example
@@ -202,7 +204,7 @@ declare function mskput<T = unknown, U = unknown>( x: AccessorArrayLike<T>, mask
202204
* var mask = [ 1, 0, 0, 1 ];
203205
* var values = [ 20, 30 ];
204206
*
205-
* var out = mskput( x, mask, values, 'throw' );
207+
* var out = mskput( x, mask, values, 'strict' );
206208
* // returns [ 1, 20, 30, 4 ]
207209
*
208210
* var bool = ( out === x );
@@ -211,7 +213,7 @@ declare function mskput<T = unknown, U = unknown>( x: AccessorArrayLike<T>, mask
211213
* @example
212214
* var x = [ 1, 2, 3, 4 ];
213215
*
214-
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'throw' );
216+
* var out = mskput( x, [ 1, 0, 0, 1 ], [ 30 ], 'strict' );
215217
* // returns [ 1, 30, 30, 4 ]
216218
*
217219
* var bool = ( out === x );

lib/node_modules/@stdlib/array/base/mskput/docs/types/test.ts

+26-24
Original file line numberDiff line numberDiff line change
@@ -27,44 +27,46 @@ import mskput = require( './index' );
2727

2828
// The function returns an array...
2929
{
30-
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectType number[]
30+
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectType number[]
31+
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'non_strict' ); // $ExpectType number[]
32+
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict_broadcast' ); // $ExpectType number[]
3133
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'broadcast' ); // $ExpectType number[]
3234
mskput( [ 1, 2, 3, 4 ], [ 1, 0, 0, 1 ], [ 20, 30 ], 'repeat' ); // $ExpectType number[]
3335

34-
mskput( new Int32Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectType Int32Array
35-
mskput( new Complex128Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ new Complex128( 20, 30 ), [ 40, 50 ] ], 'throw' ); // $ExpectType Complex128Array
36-
mskput( new Complex64Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ new Complex128( 20, 30 ), [ 40, 50 ] ], 'throw' ); // $ExpectType Complex64Array
37-
mskput( new AccessorArray<number>( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], new AccessorArray<number>( [ 20, 30 ] ), 'throw' ); // $ExpectType AccessorArrayLike<number>
36+
mskput( new Int32Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectType Int32Array
37+
mskput( new Complex128Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ new Complex128( 20, 30 ), [ 40, 50 ] ], 'strict' ); // $ExpectType Complex128Array
38+
mskput( new Complex64Array( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], [ new Complex128( 20, 30 ), [ 40, 50 ] ], 'strict' ); // $ExpectType Complex64Array
39+
mskput( new AccessorArray<number>( [ 1, 2, 3, 4 ] ), [ 1, 0, 0, 1 ], new AccessorArray<number>( [ 20, 30 ] ), 'strict' ); // $ExpectType AccessorArrayLike<number>
3840
}
3941

4042
// The compiler throws an error if the function is provided a first argument which is not an array-like object...
4143
{
42-
mskput( 1, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
43-
mskput( true, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
44-
mskput( false, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
45-
mskput( null, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
46-
mskput( void 0, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
47-
mskput( {}, [ 1, 0, 0, 1 ], [ 20, 30 ], 'throw' ); // $ExpectError
44+
mskput( 1, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
45+
mskput( true, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
46+
mskput( false, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
47+
mskput( null, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
48+
mskput( void 0, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
49+
mskput( {}, [ 1, 0, 0, 1 ], [ 20, 30 ], 'strict' ); // $ExpectError
4850
}
4951

5052
// The compiler throws an error if the function is provided a second argument which is not an array-like object...
5153
{
52-
mskput( [], 1, [ 20, 30 ], 'throw' ); // $ExpectError
53-
mskput( [], true, [ 20, 30 ], 'throw' ); // $ExpectError
54-
mskput( [], false, [ 20, 30 ], 'throw' ); // $ExpectError
55-
mskput( [], null, [ 20, 30 ], 'throw' ); // $ExpectError
56-
mskput( [], void 0, [ 20, 30 ], 'throw' ); // $ExpectError
57-
mskput( [], {}, [ 20, 30 ], 'throw' ); // $ExpectError
54+
mskput( [], 1, [ 20, 30 ], 'strict' ); // $ExpectError
55+
mskput( [], true, [ 20, 30 ], 'strict' ); // $ExpectError
56+
mskput( [], false, [ 20, 30 ], 'strict' ); // $ExpectError
57+
mskput( [], null, [ 20, 30 ], 'strict' ); // $ExpectError
58+
mskput( [], void 0, [ 20, 30 ], 'strict' ); // $ExpectError
59+
mskput( [], {}, [ 20, 30 ], 'strict' ); // $ExpectError
5860
}
5961

6062
// The compiler throws an error if the function is provided a third argument which is not an array-like object...
6163
{
62-
mskput( [], [ 1, 0, 0, 1 ], 1, 'throw' ); // $ExpectError
63-
mskput( [], [ 1, 0, 0, 1 ], true, 'throw' ); // $ExpectError
64-
mskput( [], [ 1, 0, 0, 1 ], false, 'throw' ); // $ExpectError
65-
mskput( [], [ 1, 0, 0, 1 ], null, 'throw' ); // $ExpectError
66-
mskput( [], [ 1, 0, 0, 1 ], void 0, 'throw' ); // $ExpectError
67-
mskput( [], [ 1, 0, 0, 1 ], {}, 'throw' ); // $ExpectError
64+
mskput( [], [ 1, 0, 0, 1 ], 1, 'strict' ); // $ExpectError
65+
mskput( [], [ 1, 0, 0, 1 ], true, 'strict' ); // $ExpectError
66+
mskput( [], [ 1, 0, 0, 1 ], false, 'strict' ); // $ExpectError
67+
mskput( [], [ 1, 0, 0, 1 ], null, 'strict' ); // $ExpectError
68+
mskput( [], [ 1, 0, 0, 1 ], void 0, 'strict' ); // $ExpectError
69+
mskput( [], [ 1, 0, 0, 1 ], {}, 'strict' ); // $ExpectError
6870
}
6971

7072
// The compiler throws an error if the function is provided a fourth argument which is not a valid mode...
@@ -86,5 +88,5 @@ import mskput = require( './index' );
8688
mskput( [] ); // $ExpectError
8789
mskput( [], [] ); // $ExpectError
8890
mskput( [], [], [], ); // $ExpectError
89-
mskput( [], [], [], 'throw', {} ); // $ExpectError
91+
mskput( [], [], [], 'strict', {} ); // $ExpectError
9092
}

lib/node_modules/@stdlib/array/base/mskput/examples/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ var values = filledBy( N, discreteUniform.factory( 1000, 2000 ) );
3838
console.log( values );
3939

4040
// Update a random sample of elements in `x`:
41-
var out = mskput( x, mask, values, 'throw' );
41+
var out = mskput( x, mask, values, 'non_strict' );
4242
console.log( out );

lib/node_modules/@stdlib/array/base/mskput/lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* var mask = [ 1, 0, 0, 1 ];
3232
* var values = [ 20, 30 ];
3333
*
34-
* var out = mskput( x, mask, values, 'throw' );
34+
* var out = mskput( x, mask, values, 'strict' );
3535
* // returns [ 1, 20, 30, 4 ]
3636
*
3737
* var bool = ( out === x );

0 commit comments

Comments
 (0)