|
2 | 2 |
|
3 | 3 | @license Apache-2.0 |
4 | 4 |
|
5 | | -Copyright (c) 2018 The Stdlib Authors. |
| 5 | +Copyright (c) 2024 The Stdlib Authors. |
6 | 6 |
|
7 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
8 | 8 | you may not use this file except in compliance with the License. |
@@ -109,6 +109,7 @@ For guidance on reviving a JSON-serialized typed array, see [`reviver()`][@stdli |
109 | 109 | - [`Float32Array`][@stdlib/array/float32] |
110 | 110 | - [`Complex128Array`][@stdlib/array/complex128] |
111 | 111 | - [`Complex64Array`][@stdlib/array/complex64] |
| 112 | + - [`BooleanArray`][@stdlib/array/bool] |
112 | 113 | - [`Int32Array`][@stdlib/array/int32] |
113 | 114 | - [`Uint32Array`][@stdlib/array/uint32] |
114 | 115 | - [`Int16Array`][@stdlib/array/int16] |
@@ -163,6 +164,7 @@ var Uint8Array = require( '@stdlib/array-uint8' ); |
163 | 164 | var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); |
164 | 165 | var Complex64Array = require( '@stdlib/array-complex64' ); |
165 | 166 | var Complex128Array = require( '@stdlib/array-complex128' ); |
| 167 | +var BooleanArray = require( '@stdlib/array-bool' ); |
166 | 168 | var typedarray2json = require( '@stdlib/array-to-json' ); |
167 | 169 |
|
168 | 170 | var arr = new Float64Array( [ 5.0, 3.0 ] ); |
@@ -201,6 +203,15 @@ json = typedarray2json( arr ); |
201 | 203 | } |
202 | 204 | */ |
203 | 205 |
|
| 206 | +arr = new BooleanArray( [ true, false ] ); |
| 207 | +json = typedarray2json( arr ); |
| 208 | +/* returns |
| 209 | + { |
| 210 | + 'type': 'BooleanArray', |
| 211 | + 'data': [ 1, 0 ] |
| 212 | + } |
| 213 | +*/ |
| 214 | +
|
204 | 215 | arr = new Int32Array( [ -5, 3 ] ); |
205 | 216 | json = typedarray2json( arr ); |
206 | 217 | /* returns |
@@ -373,6 +384,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. |
373 | 384 |
|
374 | 385 | [@stdlib/array/complex64]: https://github.com/stdlib-js/array-complex64 |
375 | 386 |
|
| 387 | +[@stdlib/array/bool]: https://github.com/stdlib-js/array-bool |
| 388 | + |
376 | 389 | [@stdlib/array/int32]: https://github.com/stdlib-js/array-int32 |
377 | 390 |
|
378 | 391 | [@stdlib/array/uint32]: https://github.com/stdlib-js/array-uint32 |
|
0 commit comments