{"_id":"@stdlib/array-base-flatten2d-by","_rev":"6-9dde746561d27235c254d2939802fbca","name":"@stdlib/array-base-flatten2d-by","dist-tags":{"latest":"0.2.3"},"versions":{"0.0.1":{"name":"@stdlib/array-base-flatten2d-by","version":"0.0.1","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/array-base-flatten2d-by@0.0.1","maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"ba3d4777ae3d436ec74ddef5068b3f228a3fb88f","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.0.1.tgz","fileCount":8,"integrity":"sha512-JdDjlGBJBPBjaTkivroRNPbWzcpzUdv3bcQE+0KvOfmRdcyZ1wpRlnMMrVSYA0xSt58Ez62AZAgiUg9D1Quksw==","signatures":[{"sig":"MEQCIErfG63HKSpg6P25EVJ3TebDMzd4cnjp6n3X0WlIH8gSAiA8SbwylsktY/TeMqgYCuf4r9Akr2KkVv37dPyS964mXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32165},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"8ba7f2cc06e6dc82fc87a168d254e07eaca7c79b","scripts":{"test":"make test","examples":"make examples","test-cov":"make test-cov","benchmark":"make benchmark"},"_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/array-base-flatten2d-by.git","type":"git"},"_npmVersion":"8.19.4","description":"Flatten a two-dimensional nested array according to a callback function.","directories":{"doc":"./docs","lib":"./lib","test":"./test","example":"./examples","benchmark":"./benchmark"},"_nodeVersion":"16.20.1","dependencies":{"@stdlib/types":"^0.0.14","@stdlib/utils-define-nonenumerable-read-only-property":"^0.0.7"},"_hasShrinkwrap":false,"devDependencies":{"tape":"git+https://github.com/kgryte/tape.git#fix/globby","tap-min":"git+https://github.com/Planeshifter/tap-min.git","istanbul":"^0.4.1","@stdlib/bench":"^0.0.12","@stdlib/array-float64":"^0.0.6","@stdlib/assert-is-array":"^0.0.7","@stdlib/array-base-filled":"^0.0.2","@stdlib/array-base-zero-to":"^0.0.6","@stdlib/utils-nary-function":"^0.0.1","@stdlib/math-base-special-abs":"^0.0.6","@stdlib/assert-is-float64array":"^0.0.8","@stdlib/assert-has-own-property":"^0.0.7"},"_npmOperationalInternal":{"tmp":"tmp/array-base-flatten2d-by_0.0.1_1690642813617_0.013978941531592737","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@stdlib/array-base-flatten2d-by","version":"0.1.0","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/array-base-flatten2d-by@0.1.0","maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"187d6e9e7160b58b499c97e135ceeb67177426f1","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.1.0.tgz","fileCount":12,"integrity":"sha512-dkWcyNVwZanpwCleZ5QPvYA3VSqYZSSyZnWdUb4LPbvKasq2Y96eniLg6ZDAGlGRQD8yQcMNaxyufY1lMYcNSA==","signatures":[{"sig":"MEUCIGgKjO1wW2HoXGomdfOH9FoEA9tn3z7XK6SvyS8P5V73AiEAj2yBkkOAR1Ol2Y/4HxBFziUtSVjyEIYopjJaztny9lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44317},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"09e778888dc3ceb96e90fcf9e55bdfae4f1d729e","scripts":{"test":"make test","examples":"make examples","test-cov":"make test-cov","benchmark":"make benchmark"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/array-base-flatten2d-by.git","type":"git"},"_npmVersion":"8.19.4","description":"Flatten a two-dimensional nested array according to a callback function.","directories":{"doc":"./docs","lib":"./lib","test":"./test","example":"./examples","benchmark":"./benchmark"},"_nodeVersion":"16.20.2","dependencies":{"@stdlib/types":"^0.1.0","@stdlib/utils-define-nonenumerable-read-only-property":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"git+https://github.com/kgryte/tape.git#fix/globby","tap-min":"git+https://github.com/Planeshifter/tap-min.git","istanbul":"^0.4.1","@stdlib/bench":"^0.1.0","@stdlib/array-float64":"^0.1.0","@stdlib/assert-is-array":"^0.1.0","@stdlib/array-base-filled":"^0.0.2","@stdlib/array-base-zero-to":"^0.1.0","@stdlib/utils-nary-function":"^0.1.0","@stdlib/math-base-special-abs":"^0.1.0","@stdlib/assert-is-float64array":"^0.1.0","@stdlib/assert-has-own-property":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/array-base-flatten2d-by_0.1.0_1695534569368_0.9859016272127432","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@stdlib/array-base-flatten2d-by","version":"0.2.0","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/array-base-flatten2d-by@0.2.0","maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"15b63a2f4e5f7be04496f3c270baab9483afa8a4","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.2.0.tgz","fileCount":12,"integrity":"sha512-cKpMiZ5AxkDz5OmxQqM9wRN15Y9u7UOkKzGDDp6JGssoOh0HTU/4nQ+T27uoafRJOgD8Dt5Fxj1mLySkA5dhFg==","signatures":[{"sig":"MEUCIG9D37cJME2FowIi4VEHYrLHl0zCgGXaq0KVZYlX5R4MAiEA0ggtd/rT3aZe7UJSDfKp6KHUquyQGSNQCyLP37izdus=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44197},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"7137673f0798ef13d7c9fd7becf78e557b1d583b","scripts":{"test":"make test","examples":"make examples","test-cov":"make test-cov","benchmark":"make benchmark"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/array-base-flatten2d-by.git","type":"git"},"_npmVersion":"8.19.4","description":"Flatten a two-dimensional nested array according to a callback function.","directories":{"doc":"./docs","lib":"./lib","test":"./test","example":"./examples","benchmark":"./benchmark"},"_nodeVersion":"16.20.2","dependencies":{"@stdlib/types":"^0.3.1","@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"git+https://github.com/kgryte/tape.git#fix/globby","tap-min":"git+https://github.com/Planeshifter/tap-min.git","istanbul":"^0.4.1","@stdlib/bench":"^0.3.1","@stdlib/array-float64":"^0.1.1","@stdlib/bench-harness":"^0.2.0","@stdlib/assert-is-array":"^0.1.1","@stdlib/array-base-filled":"^0.1.0","@stdlib/array-base-zero-to":"^0.1.0","@stdlib/utils-nary-function":"^0.2.0","@stdlib/math-base-special-abs":"^0.1.1","@stdlib/assert-is-float64array":"^0.1.1","@stdlib/assert-has-own-property":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/array-base-flatten2d-by_0.2.0_1707901565789_0.6373860934010753","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@stdlib/array-base-flatten2d-by","version":"0.2.1","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/array-base-flatten2d-by@0.2.1","maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"7c1785369435e82f0519338b65101d8acac3ae25","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.2.1.tgz","fileCount":12,"integrity":"sha512-OERmZZY46tJyBUBaYWOAGxpaUHDQf3i2ZwPJeP0DtCyqA3PGehtF0IFW8euUgfqt/4UIkXmR/LybmeBpOsUoPA==","signatures":[{"sig":"MEYCIQDYloPIFnK2I3xZHSZYKrjlMsu6KFqNE+yfBn5WSUD8jAIhAPJP+HjOCiCTFi3F5vJxSf9drZ5lzyd4Nc8CGqbh3IBN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43392},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"31aff930532b53e34d2c7386684375a079fcf6bb","scripts":{},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/array-base-flatten2d-by.git","type":"git"},"_npmVersion":"8.19.4","description":"Flatten a two-dimensional nested array according to a callback function.","directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"_nodeVersion":"16.20.2","dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/array-base-flatten2d-by_0.2.1_1708812843269_0.8603453657667846","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@stdlib/array-base-flatten2d-by","version":"0.2.2","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/array-base-flatten2d-by@0.2.2","maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"c70b3483cc2cb70f8700511bf6ac5f8ec860f57d","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.2.2.tgz","fileCount":12,"integrity":"sha512-BdCX08++rdUnRT/Z18IrfSNYM76zIApFrzX+DU6CLpQTPj7ap/3mTjwYNxcP7S/XFoCcBX9G8FU/ivMdEyndKw==","signatures":[{"sig":"MEUCIDM3ROjbMEN3WdiDWv9EKYk+In8l0otecpJh4R/o6PcQAiEAo5v4wLgIP8vNkiGUj3jO8o9QhJ53tMNwHZ603WprPYo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43392},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"39a67731ee7d3e1f6afb827ba59c89526b975f0a","scripts":{},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/array-base-flatten2d-by.git","type":"git"},"_npmVersion":"8.19.4","description":"Flatten a two-dimensional nested array according to a callback function.","directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"_nodeVersion":"16.20.2","dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/array-base-flatten2d-by_0.2.2_1722201505832_0.5876244878766745","host":"s3://npm-registry-packages"}},"0.2.3":{"name":"@stdlib/array-base-flatten2d-by","version":"0.2.3","description":"Flatten a two-dimensional nested array according to a callback function.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"types":"./docs/types","scripts":{},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/array-base-flatten2d-by.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.3"},"devDependencies":{},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"_id":"@stdlib/array-base-flatten2d-by@0.2.3","gitHead":"65ac870bcc9363ee25cdde72514d9e0783b5395e","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-WJH6agLnsn1ySc53xSMjAPIi+E21VSCaIYcds0WSSqpmXX617Mv0GUGDuzqYUj9RHgRRFp74Zz2IJHjbdGHBGg==","shasum":"dff62b00fb8611fe7bd17b6f633cb0d1ab47e8af","tarball":"https://registry.npmjs.org/@stdlib/array-base-flatten2d-by/-/array-base-flatten2d-by-0.2.3.tgz","fileCount":12,"unpackedSize":43656,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAXE44rzg/OVQqxKjV5W9uBHTFi1vHWiF1+vtJzR3FzuAiEAl2MgygCgywbwGDs5cBA0e/wvOVuO+cDnDphlDdiw14U="}]},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/array-base-flatten2d-by_0.2.3_1770532012350_0.9484899005702561"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-29T15:00:13.542Z","modified":"2026-02-08T06:26:52.670Z","0.0.1":"2023-07-29T15:00:13.812Z","0.1.0":"2023-09-24T05:49:29.556Z","0.2.0":"2024-02-14T09:06:05.958Z","0.2.1":"2024-02-24T22:14:03.479Z","0.2.2":"2024-07-28T21:18:26.026Z","0.2.3":"2026-02-08T06:26:52.484Z"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"license":"Apache-2.0","homepage":"https://stdlib.io","keywords":["stdlib","utilities","utils","generic","array","flatten","flat","2d","matrix","strided","ndarray","multidimensional","foreach","map","transform","callback","accessor"],"repository":{"type":"git","url":"git://github.com/stdlib-js/array-base-flatten2d-by.git"},"description":"Flatten a two-dimensional nested array according to a callback function.","contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"readme":"<!--\n\n@license Apache-2.0\n\nCopyright (c) 2023 The Stdlib Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n-->\n\n<!-- lint disable maximum-heading-length -->\n\n\n<details>\n  <summary>\n    About stdlib...\n  </summary>\n  <p>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.</p>\n  <p>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.</p>\n  <p>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.</p>\n  <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href=\"https://github.com/stdlib-js/stdlib\">GitHub</a>, and please consider <a href=\"https://opencollective.com/stdlib\">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>\n</details>\n\n# flatten2dBy\n\n[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->\n\n> Flatten a two-dimensional nested array according to a callback function.\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/array-base-flatten2d-by\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar flatten2dBy = require( '@stdlib/array-base-flatten2d-by' );\n```\n\n#### flatten2dBy( x, shape, colexicographic, clbk\\[, thisArg] )\n\nFlattens a two-dimensional nested array according to a callback function.\n\n```javascript\nfunction scale( v ) {\n    return v * 2;\n}\n\nvar x = [ [ 1, 2 ], [ 3, 4 ] ];\n\nvar out = flatten2dBy( x, [ 2, 2 ], false, scale );\n// returns [ 2, 4, 6, 8 ]\n```\n\nTo flatten in colexicographic order, provide a third argument equal to `true`.\n\n```javascript\nfunction scale( v ) {\n    return v * 2;\n}\n\nvar x = [ [ 1, 2 ], [ 3, 4 ] ];\n\nvar out = flatten2dBy( x, [ 2, 2 ], true, scale );\n// returns [ 2, 6, 4, 8 ]\n```\n\nTo set the callback execution context, provide a `thisArg` argument.\n\n<!-- eslint-disable no-invalid-this -->\n\n```javascript\nfunction scale( v ) {\n    this.count += 1;\n    return v * 2;\n}\n\nvar x = [ [ 1, 2 ], [ 3, 4 ] ];\nvar ctx = {\n    'count': 0\n};\n\nvar out = flatten2dBy( x, [ 2, 2 ], false, scale, ctx );\n// returns [ 2, 4, 6, 8 ]\n\nvar count = ctx.count;\n// returns 4\n```\n\n#### flatten2dBy.assign( x, shape, colexicographic, out, stride, offset, clbk\\[, thisArg] )\n\nFlattens a two-dimensional nested array according to a callback function and assigns elements to a provided output array.\n\n```javascript\nvar Float64Array = require( '@stdlib/array-float64' );\n\nfunction scale( v ) {\n    return v * 2;\n}\n\nvar x = [ [ 1, 2 ], [ 3, 4 ] ];\nvar out = new Float64Array( 4 );\n\nvar y = flatten2dBy.assign( x, [ 2, 2 ], false, out, 1, 0, scale );\n// returns <Float64Array>[ 2, 4, 6, 8 ]\n\nvar bool = ( y === out );\n// returns true\n\ny = flatten2dBy.assign( x, [ 2, 2 ], true, out, 1, 0, scale );\n// returns <Float64Array>[ 2, 6, 4, 8 ]\n```\n\n</section>\n\n<!-- /.usage -->\n\n<section class=\"notes\">\n\n## Notes\n\n-   A callback function is provided the following arguments:\n\n    -   **value**: nested array element.\n    -   **indices**: element indices (in lexicographic order).\n    -   **arr**: the input array.\n\n-   Both functions assume that all nested arrays have the same length (i.e., the input array is **not** a ragged array).\n\n</section>\n\n<!-- /.notes -->\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar naryFunction = require( '@stdlib/utils-nary-function' );\nvar abs = require( '@stdlib/math-base-special-abs' );\nvar flatten2dBy = require( '@stdlib/array-base-flatten2d-by' );\n\nvar fcn = naryFunction( abs, 1 );\n\nvar x = [\n    [ -1, -2, -3, -4 ],\n    [ -5, -6, -7, -8 ],\n    [ -9, -10, -11, -12 ],\n    [ -13, -14, -15, -16 ]\n];\n\nvar out = flatten2dBy( x, [ 0, 0 ], false, fcn );\n// returns []\n\nout = flatten2dBy( x, [ 0, 0 ], true, fcn );\n// returns []\n\nout = flatten2dBy( x, [ 1, 1 ], false, fcn );\n// returns [ 1 ]\n\nout = flatten2dBy( x, [ 1, 1 ], true, fcn );\n// returns [ 1 ]\n\nout = flatten2dBy( x, [ 2, 2 ], false, fcn );\n// returns [ 1, 2, 5, 6 ]\n\nout = flatten2dBy( x, [ 2, 2 ], true, fcn );\n// returns [ 1, 5, 2, 6 ]\n\nout = flatten2dBy( x, [ 3, 3 ], false, fcn );\n// returns [ 1, 2, 3, 5, 6, 7, 9, 10, 11 ]\n\nout = flatten2dBy( x, [ 3, 3 ], true, fcn );\n// returns [ 1, 5, 9, 2, 6, 10, 3, 7, 11 ]\n\nout = flatten2dBy( x, [ 4, 4 ], false, fcn );\n// returns [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]\n\nout = flatten2dBy( x, [ 4, 4 ], true, fcn );\n// returns [ 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16 ]\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->\n\n<section class=\"related\">\n\n* * *\n\n## See Also\n\n-   <span class=\"package-name\">[`@stdlib/array-base/flatten2d`][@stdlib/array/base/flatten2d]</span><span class=\"delimiter\">: </span><span class=\"description\">flatten a two-dimensional nested array.</span>\n\n</section>\n\n<!-- /.related -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n\n<section class=\"main-repo\" >\n\n* * *\n\n## Notice\n\nThis package is part of [stdlib][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.\n\nFor more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n---\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n\n## Copyright\n\nCopyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].\n\n</section>\n\n<!-- /.stdlib -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"links\">\n\n[npm-image]: http://img.shields.io/npm/v/@stdlib/array-base-flatten2d-by.svg\n[npm-url]: https://npmjs.org/package/@stdlib/array-base-flatten2d-by\n\n[test-image]: https://github.com/stdlib-js/array-base-flatten2d-by/actions/workflows/test.yml/badge.svg?branch=v0.2.3\n[test-url]: https://github.com/stdlib-js/array-base-flatten2d-by/actions/workflows/test.yml?query=branch:v0.2.3\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-base-flatten2d-by/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/array-base-flatten2d-by?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/array-base-flatten2d-by.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/array-base-flatten2d-by/main\n\n-->\n\n[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg\n[chat-url]: https://stdlib.zulipchat.com\n\n[stdlib]: https://github.com/stdlib-js/stdlib\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[umd]: https://github.com/umdjs/umd\n[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\n\n[deno-url]: https://github.com/stdlib-js/array-base-flatten2d-by/tree/deno\n[deno-readme]: https://github.com/stdlib-js/array-base-flatten2d-by/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/array-base-flatten2d-by/tree/umd\n[umd-readme]: https://github.com/stdlib-js/array-base-flatten2d-by/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/array-base-flatten2d-by/tree/esm\n[esm-readme]: https://github.com/stdlib-js/array-base-flatten2d-by/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/array-base-flatten2d-by/blob/main/branches.md\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/array-base-flatten2d-by/main/LICENSE\n\n<!-- <related-links> -->\n\n[@stdlib/array/base/flatten2d]: https://www.npmjs.com/package/@stdlib/array-base-flatten2d\n\n<!-- </related-links> -->\n\n</section>\n\n<!-- /.links -->\n","readmeFilename":"README.md"}