Gathering detailed insights and metrics for @stdlib/array-base-filled3d-by
Gathering detailed insights and metrics for @stdlib/array-base-filled3d-by
Create a filled three-dimensional nested array according to a provided callback function.
npm install @stdlib/array-base-filled3d-by
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.1
Supply Chain
98.7
Quality
82.7
Maintenance
100
Vulnerability
88
License
JavaScript (100%)
Total Downloads
4,817
Last Day
2
Last Week
46
Last Month
213
Last Year
3,006
1 Stars
28 Commits
3 Watching
5 Branches
11 Contributors
Minified
Minified + Gzipped
Latest Version
0.2.2
Package Id
@stdlib/array-base-filled3d-by@0.2.2
Unpacked Size
27.82 kB
Size
8.29 kB
File Count
11
NPM Version
8.19.4
Node Version
16.20.2
Publised On
28 Jul 2024
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
7%
46
Compared to previous week
Last month
-22%
213
Compared to previous month
Last year
66%
3,006
Compared to previous year
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Create a filled three-dimensional nested array according to a provided callback function.
1npm install @stdlib/array-base-filled3d-by
1var filled3dBy = require( '@stdlib/array-base-filled3d-by' );
Returns a filled three-dimensional nested array according to a provided callback function.
1function clbk() { 2 return 1.0; 3} 4 5var out = filled3dBy( [ 2, 1, 3 ], clbk ); 6// returns [ [ [ 1.0, 1.0, 1.0 ] ], [ [ 1.0, 1.0, 1.0 ] ] ]
When invoked, a callback function is provided a single argument:
To set the callback execution context, provide a thisArg
.
1function clbk() { 2 this.count += 1; 3 return 1.0; 4} 5 6var ctx = { 7 'count': 0 8}; 9 10var out = filled3dBy( [ 1, 2, 3 ], clbk, ctx ); 11// returns [ [ [ 1.0, 1.0, 1.0 ], [ 1.0, 1.0, 1.0 ] ] ]; 12 13var cnt = ctx.count; 14// returns 6
1var constantFunction = require( '@stdlib/utils-constant-function' ); 2var filled3dBy = require( '@stdlib/array-base-filled3d-by' ); 3 4var out = filled3dBy( [ 1, 1, 3 ], constantFunction( 0.0 ) ); 5// returns [ [ [ 0.0, 0.0, 0.0 ] ] ] 6 7out = filled3dBy( [ 1, 3, 1 ], constantFunction( 'beep' ) ); 8// returns [ [ [ 'beep' ], [ 'beep' ], [ 'beep' ] ] ] 9 10out = filled3dBy( [ 1, 1, 3 ], constantFunction( null ) ); 11// returns [ [ [ null, null, null ] ] ] 12 13out = filled3dBy( [ 1, 3, 1 ], constantFunction( true ) ); 14// returns [ [ [ true ], [ true ], [ true ] ] ] 15 16out = filled3dBy( [ 1, 1, 3 ], constantFunction( void 0 ) ); 17// returns [ [ [ undefined, undefined, undefined ] ] ]
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.
No vulnerabilities found.
No security vulnerabilities found.