{"_id":"@stdlib/console-log-each-map","_rev":"3-e66dcfa2800ba8b996b9f1d1bc13ca36","name":"@stdlib/console-log-each-map","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@stdlib/console-log-each-map","version":"0.1.0","keywords":["stdlib","console","log","logger","debug","debugging","print","map","each","foreach","array","element","format","string"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/console-log-each-map@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":"f810ee162a2a90beb5d2e1b413bb1580ecdad494","tarball":"https://registry.npmjs.org/@stdlib/console-log-each-map/-/console-log-each-map-0.1.0.tgz","fileCount":11,"integrity":"sha512-j+yjjKw1Ua3xREZWCrHrvOGKq6a/dgDngmCjYoid8mN3++m5A53wScjVPgK8ioGVoqE8FiXs9bs6zHavkAp1Cw==","signatures":[{"sig":"MEUCIDBYjMcbj9o2+xq95TajqrkFrTkY1JBPahHcc6JTUibJAiEAooCNutvkYrmOjiTlNPiN/x/gLXh5X/wFH6OmBh9oEww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56956},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"d660cabc2799c7f43cda85b7a4ff65e0995a9a1e","scripts":{},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/console-log-each-map.git","type":"git"},"_npmVersion":"10.8.2","description":"Insert array element values and the result of a callback function into a format string and print the result.","directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"_nodeVersion":"20.20.0","dependencies":{"@stdlib/console-log":"^0.2.2","@stdlib/string-format":"^0.2.2","@stdlib/array-base-nulls":"github:stdlib-js/array-base-nulls#main","@stdlib/array-base-zeros":"^0.2.2","@stdlib/assert-is-string":"^0.2.2","@stdlib/assert-is-function":"^0.2.2","@stdlib/assert-is-collection":"^0.2.2","@stdlib/error-tools-fmtprodmsg":"^0.2.2","@stdlib/array-base-resolve-getter":"^0.2.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/console-log-each-map_0.1.0_1769796320375_0.27042647281862253","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@stdlib/console-log-each-map","version":"0.1.1","keywords":["stdlib","console","log","logger","debug","debugging","print","map","each","foreach","array","element","format","string"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/console-log-each-map@0.1.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":"06e63622eb56b2ac87c41fdb77cd780e1d70f794","tarball":"https://registry.npmjs.org/@stdlib/console-log-each-map/-/console-log-each-map-0.1.1.tgz","fileCount":11,"integrity":"sha512-NF9uwnV2DwMs4LAcavPFlG75fHrHMAhENFNLqrJXCZ6SxnsXLjqNMdRbIWLuUQYd3auFncG0Rc8gHJ3aOfD/YQ==","signatures":[{"sig":"MEUCIQDDI96FAMEIIRSBgetqg2WiJ5o7x2a9TKxSvzjFBkIJHAIgV6UJzNMGowo0T/14tPM1JOETRC2DIiT/dIESsc46kxU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56924},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"65ac870bcc9363ee25cdde72514d9e0783b5395e","scripts":{},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/console-log-each-map.git","type":"git"},"_npmVersion":"10.8.2","description":"Insert array element values and the result of a callback function into a format string and print the result.","directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"_nodeVersion":"20.20.0","dependencies":{"@stdlib/console-log":"^0.2.3","@stdlib/string-format":"^0.2.3","@stdlib/array-base-nulls":"^0.1.1","@stdlib/array-base-zeros":"^0.2.3","@stdlib/assert-is-string":"^0.2.3","@stdlib/assert-is-function":"^0.2.3","@stdlib/assert-is-collection":"^0.2.3","@stdlib/error-tools-fmtprodmsg":"^0.2.3","@stdlib/array-base-resolve-getter":"^0.2.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/console-log-each-map_0.1.1_1770572599018_0.17013731947002908","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"_id":"@stdlib/console-log-each-map@0.1.2","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dist":{"shasum":"4438bdca1fd59e7d1f719acc1fc3a3fc5bf50b55","tarball":"https://registry.npmjs.org/@stdlib/console-log-each-map/-/console-log-each-map-0.1.2.tgz","fileCount":11,"integrity":"sha512-9VCq6E0Rn1p+bFj4CzidLZulfKRKOF8QBMwGe8akxQoPE3iWFrapH/z7lQj+QMU+XMwM7sPWMz4EThZJqnlW1g==","signatures":[{"sig":"MEUCIFfsPg0a59XsdLQzElhkC7yeuPmzj+ACAluzmYCjGo2IAiEA+8N0mK7fh6TKjt4ats2tKNkj2vOkVuiI7zDZPiLob3s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBkQT/XVcYAVjWcna9lYWY/GO7OL/FwmBwCb2mQyqIlnAiEAqcIGBBm5jvGNzaseGCfZbukalLZEhmgUuBjmIfskk00="}],"unpackedSize":57596},"main":"./lib","name":"@stdlib/console-log-each-map","types":"./docs/types","author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"47f0d9f62e9b27a376d7451d52c528a2233fe719","license":"Apache-2.0","scripts":{"test":"make test","examples":"make examples","test-cov":"make test-cov","benchmark":"make benchmark"},"version":"0.1.2","_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"homepage":"https://stdlib.io","keywords":["stdlib","console","log","logger","debug","debugging","print","map","each","foreach","array","element","format","string"],"repository":{"url":"git://github.com/stdlib-js/console-log-each-map.git","type":"git"},"_npmVersion":"10.8.2","description":"Insert array element values and the result of a callback function into a format string and print the result.","directories":{"doc":"./docs","lib":"./lib","test":"./test","example":"./examples","benchmark":"./benchmark"},"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"}],"_nodeVersion":"20.20.2","contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"dependencies":{"@stdlib/console-log":"^0.2.3","@stdlib/string-format":"^0.2.3","@stdlib/array-base-nulls":"^0.1.1","@stdlib/array-base-zeros":"^0.2.3","@stdlib/assert-is-string":"^0.2.3","@stdlib/assert-is-function":"^0.2.3","@stdlib/assert-is-collection":"^0.2.3","@stdlib/error-tools-fmtprodmsg":"^0.2.3","@stdlib/array-base-resolve-getter":"^0.2.3"},"_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","proxyquire":"^2.0.0","@stdlib/utils-noop":"^0.2.3","@stdlib/array-zeros":"^0.2.3","@stdlib/bench-harness":"^0.2.3","@stdlib/math-base-special-pow":"^0.3.1","@stdlib/array-base-to-accessor-array":"^0.2.3","@stdlib/random-array-discrete-uniform":"^0.2.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/console-log-each-map_0.1.2_1790920932914_0.621347210942742"}}},"time":{"created":"2026-01-30T18:05:20.242Z","modified":"2026-10-02T06:02:13.199Z","0.1.0":"2026-01-30T18:05:20.586Z","0.1.1":"2026-02-08T17:43:19.149Z","0.1.2":"2026-10-02T06:02:13.009Z"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","homepage":"https://stdlib.io","keywords":["stdlib","console","log","logger","debug","debugging","print","map","each","foreach","array","element","format","string"],"repository":{"url":"git://github.com/stdlib-js/console-log-each-map.git","type":"git"},"description":"Insert array element values and the result of a callback function into a format string and print the result.","contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"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) 2025 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\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# logEachMap\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> Insert array element values and the result of a callback function into a [format string][@stdlib/string/format] and print the result.\n\n<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->\n\n<section class=\"intro\">\n\n</section>\n\n<!-- /.intro -->\n\n<!-- Package usage documentation. -->\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/console-log-each-map\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar logEachMap = require( '@stdlib/console-log-each-map' );\n```\n\n#### logEachMap( str\\[, ...args], clbk\\[, thisArg] )\n\nInserts array element values and the result of a callback function into a [format string][@stdlib/string/format] and prints the result.\n\n```javascript\nfunction add( a, b ) {\n    return a + b;\n}\n\nvar x = [ 1, 2, 3 ];\nvar y = [ 4, 5, 6 ];\n\nlogEachMap( '%d + %d = %d', x, y, add );\n// e.g., => '1 + 4 = 5\\n2 + 5 = 7\\n3 + 6 = 9\\n'\n```\n\nThe function accepts the following arguments:\n\n-   **str**: format string.\n-   **args**: input arrays _(optional)_.\n-   **clbk**: callback function.\n-   **thisArg**: callback execution context _(optional)_.\n\nTo set the callback execution context, provide a `thisArg`.\n\n<!-- eslint-disable no-invalid-this -->\n\n```javascript\nfunction count( x, y ) {\n    this.count += 1;\n    return x + y;\n}\n\nvar x = [ 1, 2, 3 ];\nvar y = [ 4, 5, 6 ];\n\nvar ctx = {\n    'count': 0\n};\n\nlogEachMap( '%d + %d = %d', x, y, count, ctx );\n// e.g., => '1 + 4 = 5\\n2 + 5 = 7\\n3 + 6 = 9\\n'\n\nvar v = ctx.count;\n// returns 3\n```\n\nIf an interpolated argument is not an array-like object, the argument is broadcasted for each iteration.\n\n```javascript\nfunction multiply( x, y ) {\n    return x * y;\n}\n\nvar x = [ 1, 2, 3 ];\nvar y = 0.5;\n\nlogEachMap( '%0.1f * %0.1f = %0.1f', x, y, multiply );\n// e.g., => '1.0 * 0.5 = 0.5\\n2.0 * 0.5 = 1.0\\n3.0 * 0.5 = 1.5\\n'\n```\n\nThe callback function is provided the following arguments:\n\n-   **arg0**: current array element for the first broadcasted array.\n-   **arg1**: current array element for the second broadcasted array.\n-   **...argN**: current array element for the nth broadcasted array.\n-   **index**: current element index.\n-   **arrays**: broadcasted arrays. If an argument was broadcasted, the corresponding array is a single-element generic array containing the original element.\n\nThe number of `argX` arguments is determined according to the number of provided `args` arguments. If no `args` are provided, the callback is invoked without any arguments.\n\n</section>\n\n<!-- /.usage -->\n\n<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"notes\">\n\n## Notes\n\n-   If the function is provided array-like objects of unequal lengths, the function throws an error.\n-   The function supports array-like objects supporting the accessor protocol (e.g., [`Complex128Array`][@stdlib/array/complex128], [`Complex64Array`][@stdlib/array/complex64], etc).\n\n</section>\n\n<!-- /.notes -->\n\n<!-- Package usage examples. -->\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\nvar logEachMap = require( '@stdlib/console-log-each-map' );\n\nfunction add( x, y ) {\n    return x + y;\n}\n\nvar x = discreteUniform( 10, -50, 50, {\n    'dtype': 'float64'\n});\nvar y = discreteUniform( 10, -50, 50, {\n    'dtype': 'float64'\n});\n\nlogEachMap( '%d + %d = %d', x, y, add );\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"references\">\n\n</section>\n\n<!-- /.references -->\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</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/console-log-each-map.svg\n[npm-url]: https://npmjs.org/package/@stdlib/console-log-each-map\n\n[test-image]: https://github.com/stdlib-js/console-log-each-map/actions/workflows/test.yml/badge.svg?branch=v0.1.2\n[test-url]: https://github.com/stdlib-js/console-log-each-map/actions/workflows/test.yml?query=branch:v0.1.2\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/console-log-each-map/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/console-log-each-map?branch=v0.1.2\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/console-log-each-map.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/console-log-each-map/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/console-log-each-map/tree/deno\n[deno-readme]: https://github.com/stdlib-js/console-log-each-map/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/console-log-each-map/tree/umd\n[umd-readme]: https://github.com/stdlib-js/console-log-each-map/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/console-log-each-map/tree/esm\n[esm-readme]: https://github.com/stdlib-js/console-log-each-map/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/console-log-each-map/blob/main/branches.md\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/console-log-each-map/main/LICENSE\n\n[@stdlib/array/complex128]: https://www.npmjs.com/package/@stdlib/array-complex128\n\n[@stdlib/array/complex64]: https://www.npmjs.com/package/@stdlib/array-complex64\n\n[@stdlib/string/format]: https://www.npmjs.com/package/@stdlib/string-format\n\n</section>\n\n<!-- /.links -->\n","readmeFilename":"README.md"}