@stdlib/utils-async-inmap 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +5 -5
- package/dist/index.js.map +1 -1
- package/docs/types/index.d.ts +4 -4
- package/lib/index.js +1 -1
- package/package.json +11 -11
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -476,7 +476,7 @@ See [LICENSE][stdlib-license].
|
|
|
476
476
|
|
|
477
477
|
## Copyright
|
|
478
478
|
|
|
479
|
-
Copyright © 2016-
|
|
479
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
480
480
|
|
|
481
481
|
</section>
|
|
482
482
|
|
|
@@ -489,8 +489,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
489
489
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-async-inmap.svg
|
|
490
490
|
[npm-url]: https://npmjs.org/package/@stdlib/utils-async-inmap
|
|
491
491
|
|
|
492
|
-
[test-image]: https://github.com/stdlib-js/utils-async-inmap/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
493
|
-
[test-url]: https://github.com/stdlib-js/utils-async-inmap/actions/workflows/test.yml?query=branch:v0.2.
|
|
492
|
+
[test-image]: https://github.com/stdlib-js/utils-async-inmap/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
493
|
+
[test-url]: https://github.com/stdlib-js/utils-async-inmap/actions/workflows/test.yml?query=branch:v0.2.3
|
|
494
494
|
|
|
495
495
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-async-inmap/main.svg
|
|
496
496
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-async-inmap?branch=main
|
|
@@ -502,8 +502,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
502
502
|
|
|
503
503
|
-->
|
|
504
504
|
|
|
505
|
-
[chat-image]: https://img.shields.io/
|
|
506
|
-
[chat-url]: https://
|
|
505
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
506
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
507
507
|
|
|
508
508
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
509
509
|
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/validate.js", "../lib/limit.js", "../lib/factory.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'thisArg': {},\n* 'series': false,\n* 'limit': 10\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'thisArg' ) ) {\n\t\topts.thisArg = options.thisArg;\n\t}\n\tif ( hasOwnProp( options, 'series' ) ) {\n\t\topts.series = options.series;\n\t\tif ( !isBoolean( opts.series ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'series', opts.series ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'limit' ) ) {\n\t\topts.limit = options.limit;\n\t\tif ( !isPositiveInteger( opts.limit ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'limit', opts.limit ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar logger = require( 'debug' );\n\n\n// VARIABLES //\n\nvar debug = logger( 'inmap-async:limit' );\n\n\n// MAIN //\n\n/**\n* Invokes a function once for each element in a collection, limiting the number of concurrently pending functions, and updates a collection in-place.\n*\n* @private\n* @param {Collection} collection - input collection\n* @param {Options} opts - function options\n* @param {*} [opts.thisArg] - execution context\n* @param {PositiveInteger} [opts.limit] - maximum number of pending function invocations\n* @param {Function} fcn - function to invoke\n* @param {Callback} done - function to invoke upon completion or upon encountering an error\n* @returns {void}\n*/\nfunction limit( collection, opts, fcn, done ) {\n\tvar maxIndex;\n\tvar count;\n\tvar flg;\n\tvar lim;\n\tvar len;\n\tvar idx;\n\tvar i;\n\n\tlen = collection.length;\n\tdebug( 'Collection length: %d', len );\n\n\tif ( len === 0 ) {\n\t\tdebug( 'Finished processing a collection.' );\n\t\treturn done();\n\t}\n\tif ( len < opts.limit ) {\n\t\tlim = len;\n\t} else {\n\t\tlim = opts.limit;\n\t}\n\tdebug( 'Concurrency limit: %d', lim );\n\tdebug( 'Number of arguments: %d', fcn.length );\n\n\tmaxIndex = len - 1;\n\tcount = 0;\n\tidx = -1;\n\tfor ( i = 0; i < lim; i++ ) {\n\t\t// This guard is necessary to protect against synchronous functions which exhaust all collection elements...\n\t\tif ( idx < maxIndex ) {\n\t\t\tnext(); // eslint-disable-line node/callback-return\n\t\t}\n\t}\n\t/**\n\t* Callback to invoke a provided function for the next element in a collection.\n\t*\n\t* @private\n\t*/\n\tfunction next() {\n\t\tvar j;\n\t\tidx += 1;\n\t\tj = idx;\n\t\tdebug( 'Collection element %d: %s.', j, JSON.stringify( collection[ j ] ) );\n\t\tif ( fcn.length === 2 ) {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], cb );\n\t\t} else if ( fcn.length === 3 ) {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], j, cb );\n\t\t} else {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], j, collection, cb );\n\t\t}\n\t\t/**\n\t\t* Callback invoked once a provided function finishes processing a collection element.\n\t\t*\n\t\t* @private\n\t\t* @param {*} [error] - error\n\t\t* @param {*} [result] - result\n\t\t* @returns {void}\n\t\t*/\n\t\tfunction cb( error, result ) {\n\t\t\tif ( flg ) {\n\t\t\t\t// Prevent further processing of collection elements:\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( error ) {\n\t\t\t\tflg = true;\n\t\t\t\treturn clbk( error );\n\t\t\t}\n\t\t\tcollection[ j ] = result;\n\t\t\tclbk();\n\t\t}\n\t}\n\n\t/**\n\t* Callback invoked once ready to process the next collection element.\n\t*\n\t* @private\n\t* @param {*} [error] - error\n\t* @returns {void}\n\t*/\n\tfunction clbk( error ) {\n\t\tif ( error ) {\n\t\t\tdebug( 'Encountered an error: %s', error.message );\n\t\t\treturn done( error );\n\t\t}\n\t\tcount += 1;\n\t\tdebug( 'Processed %d of %d collection elements.', count, len );\n\t\tif ( idx < maxIndex ) {\n\t\t\treturn next();\n\t\t}\n\t\tif ( count === len ) {\n\t\t\tdebug( 'Finished processing a collection.' );\n\t\t\treturn done();\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = limit;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar format = require( '@stdlib/string-format' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar validate = require( './validate.js' );\nvar limit = require( './limit.js' );\n\n\n// MAIN //\n\n/**\n* Returns a function to invoke a function once for each element in a collection and to update the collection in-place.\n*\n* ## Notes\n*\n* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.\n* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).\n*\n* @param {Options} [options] - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series=false] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @param {Function} fcn - function to invoke for each element in a collection\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {TypeError} last argument must be a function\n* @returns {Function} function which invokes the provided function once for each element in a collection\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* var opts = {\n* 'series': true\n* };\n*\n* // Create a `inmapAsync` function which invokes `read` for each collection element sequentially:\n* var inmapAsync = factory( opts, read );\n*\n* // Create a collection over which to iterate:\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* // Define a callback which handles errors:\n* function done( error, results ) {\n* if ( error ) {\n* throw error;\n* }\n* console.log( results );\n* }\n*\n* // Run `read` for each element in `files`:\n* inmapAsync( files, done );\n*/\nfunction factory( options, fcn ) {\n\tvar opts;\n\tvar err;\n\tvar f;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tf = fcn;\n\t} else {\n\t\tf = options;\n\t}\n\tif ( !isFunction( f ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', f ) );\n\t}\n\tif ( opts.series ) {\n\t\topts.limit = 1;\n\t} else if ( !opts.limit ) {\n\t\topts.limit = PINF;\n\t}\n\treturn inmapAsync;\n\n\t/**\n\t* Invokes a function for each element in a collection and updates a collection in-place.\n\t*\n\t* @private\n\t* @param {Collection} collection - input collection\n\t* @param {Callback} done - function to invoke upon completion\n\t* @throws {TypeError} first argument must be a collection\n\t* @throws {TypeError} last argument must be a function\n\t* @returns {void}\n\t*/\n\tfunction inmapAsync( collection, done ) {\n\t\tif ( !isCollection( collection ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) );\n\t\t}\n\t\tif ( !isFunction( done ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', done ) );\n\t\t}\n\t\treturn limit( collection, opts, f, clbk );\n\n\t\t/**\n\t\t* Callback invoked upon completion.\n\t\t*\n\t\t* @private\n\t\t* @param {*} [error] - error\n\t\t* @returns {void}\n\t\t*/\n\t\tfunction clbk( error ) {\n\t\t\tif ( error ) {\n\t\t\t\treturn done( error, collection );\n\t\t\t}\n\t\t\tdone( null, collection );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\n/**\n* Invokes a function once for each element in a collection and updates a collection in-place.\n*\n* ## Notes\n*\n* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.\n* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).\n*\n* @param {Collection} collection - input collection\n* @param {Options} [options] - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series=false] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @param {Function} fcn - function to invoke for each element in a collection\n* @param {Callback} done - function to invoke upon completion\n* @throws {TypeError} first argument must be a collection\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {TypeError} second-to-last argument must be a function\n* @throws {TypeError} last argument must be a function\n* @returns {void}\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n*\n* function done( error, results ) {\n* if ( error ) {\n* throw error;\n* }\n* console.log( results );\n* }\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* inmapAsync( files, read, done );\n*/\nfunction inmapAsync( collection, options, fcn, done ) {\n\tif ( arguments.length < 4 ) {\n\t\treturn factory( options )( collection, fcn );\n\t}\n\tfactory( options, fcn )( collection, done );\n}\n\n\n// EXPORTS //\n\nmodule.exports = inmapAsync;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Invoke a function once for each element in a collection and update a collection in-place.\n*\n* @module @stdlib/utils-async-inmap\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n* var inmapAsync = require( '@stdlib/utils-async-inmap' );\n*\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* function done( error, results ) {\n* if ( error ) {\n* throw error;\n* }\n* console.log( results );\n* }\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* error = new Error( 'unable to read file: '+file );\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* inmapAsync( files, read, done );\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'thisArg': {},\n* 'series': false,\n* 'limit': 10\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'thisArg' ) ) {\n\t\topts.thisArg = options.thisArg;\n\t}\n\tif ( hasOwnProp( options, 'series' ) ) {\n\t\topts.series = options.series;\n\t\tif ( !isBoolean( opts.series ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'series', opts.series ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'limit' ) ) {\n\t\topts.limit = options.limit;\n\t\tif ( !isPositiveInteger( opts.limit ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'limit', opts.limit ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar logger = require( 'debug' );\n\n\n// VARIABLES //\n\nvar debug = logger( 'inmap-async:limit' );\n\n\n// MAIN //\n\n/**\n* Invokes a function once for each element in a collection, limiting the number of concurrently pending functions, and updates a collection in-place.\n*\n* @private\n* @param {Collection} collection - input collection\n* @param {Options} opts - function options\n* @param {*} [opts.thisArg] - execution context\n* @param {PositiveInteger} [opts.limit] - maximum number of pending function invocations\n* @param {Function} fcn - function to invoke\n* @param {Callback} done - function to invoke upon completion or upon encountering an error\n* @returns {void}\n*/\nfunction limit( collection, opts, fcn, done ) {\n\tvar maxIndex;\n\tvar count;\n\tvar flg;\n\tvar lim;\n\tvar len;\n\tvar idx;\n\tvar i;\n\n\tlen = collection.length;\n\tdebug( 'Collection length: %d', len );\n\n\tif ( len === 0 ) {\n\t\tdebug( 'Finished processing a collection.' );\n\t\treturn done();\n\t}\n\tif ( len < opts.limit ) {\n\t\tlim = len;\n\t} else {\n\t\tlim = opts.limit;\n\t}\n\tdebug( 'Concurrency limit: %d', lim );\n\tdebug( 'Number of arguments: %d', fcn.length );\n\n\tmaxIndex = len - 1;\n\tcount = 0;\n\tidx = -1;\n\tfor ( i = 0; i < lim; i++ ) {\n\t\t// This guard is necessary to protect against synchronous functions which exhaust all collection elements...\n\t\tif ( idx < maxIndex ) {\n\t\t\tnext(); // eslint-disable-line node/callback-return\n\t\t}\n\t}\n\t/**\n\t* Callback to invoke a provided function for the next element in a collection.\n\t*\n\t* @private\n\t*/\n\tfunction next() {\n\t\tvar j;\n\t\tidx += 1;\n\t\tj = idx;\n\t\tdebug( 'Collection element %d: %s.', j, JSON.stringify( collection[ j ] ) );\n\t\tif ( fcn.length === 2 ) {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], cb );\n\t\t} else if ( fcn.length === 3 ) {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], j, cb );\n\t\t} else {\n\t\t\tfcn.call( opts.thisArg, collection[ j ], j, collection, cb );\n\t\t}\n\t\t/**\n\t\t* Callback invoked once a provided function finishes processing a collection element.\n\t\t*\n\t\t* @private\n\t\t* @param {*} [error] - error\n\t\t* @param {*} [result] - result\n\t\t* @returns {void}\n\t\t*/\n\t\tfunction cb( error, result ) {\n\t\t\tif ( flg ) {\n\t\t\t\t// Prevent further processing of collection elements:\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( error ) {\n\t\t\t\tflg = true;\n\t\t\t\treturn clbk( error );\n\t\t\t}\n\t\t\tcollection[ j ] = result;\n\t\t\tclbk();\n\t\t}\n\t}\n\n\t/**\n\t* Callback invoked once ready to process the next collection element.\n\t*\n\t* @private\n\t* @param {*} [error] - error\n\t* @returns {void}\n\t*/\n\tfunction clbk( error ) {\n\t\tif ( error ) {\n\t\t\tdebug( 'Encountered an error: %s', error.message );\n\t\t\treturn done( error );\n\t\t}\n\t\tcount += 1;\n\t\tdebug( 'Processed %d of %d collection elements.', count, len );\n\t\tif ( idx < maxIndex ) {\n\t\t\treturn next();\n\t\t}\n\t\tif ( count === len ) {\n\t\t\tdebug( 'Finished processing a collection.' );\n\t\t\treturn done();\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = limit;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar format = require( '@stdlib/string-format' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar validate = require( './validate.js' );\nvar limit = require( './limit.js' );\n\n\n// MAIN //\n\n/**\n* Returns a function to invoke a function once for each element in a collection and to update the collection in-place.\n*\n* ## Notes\n*\n* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.\n* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).\n*\n* @param {Options} [options] - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series=false] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @param {Function} fcn - function to invoke for each element in a collection\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {TypeError} last argument must be a function\n* @returns {Function} function which invokes the provided function once for each element in a collection\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* var opts = {\n* 'series': true\n* };\n*\n* // Create a `inmapAsync` function which invokes `read` for each collection element sequentially:\n* var inmapAsync = factory( opts, read );\n*\n* // Create a collection over which to iterate:\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* // Define a callback which handles errors:\n* function done( error, results ) {\n* if ( error ) {\n* throw error;\n* }\n* console.log( results );\n* }\n*\n* // Run `read` for each element in `files`:\n* inmapAsync( files, done );\n*/\nfunction factory( options, fcn ) {\n\tvar opts;\n\tvar err;\n\tvar f;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tf = fcn;\n\t} else {\n\t\tf = options;\n\t}\n\tif ( !isFunction( f ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', f ) );\n\t}\n\tif ( opts.series ) {\n\t\topts.limit = 1;\n\t} else if ( !opts.limit ) {\n\t\topts.limit = PINF;\n\t}\n\treturn inmapAsync;\n\n\t/**\n\t* Invokes a function for each element in a collection and updates a collection in-place.\n\t*\n\t* @private\n\t* @param {Collection} collection - input collection\n\t* @param {Callback} done - function to invoke upon completion\n\t* @throws {TypeError} first argument must be a collection\n\t* @throws {TypeError} last argument must be a function\n\t* @returns {void}\n\t*/\n\tfunction inmapAsync( collection, done ) {\n\t\tif ( !isCollection( collection ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) );\n\t\t}\n\t\tif ( !isFunction( done ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', done ) );\n\t\t}\n\t\treturn limit( collection, opts, f, clbk );\n\n\t\t/**\n\t\t* Callback invoked upon completion.\n\t\t*\n\t\t* @private\n\t\t* @param {*} [error] - error\n\t\t* @returns {void}\n\t\t*/\n\t\tfunction clbk( error ) {\n\t\t\tif ( error ) {\n\t\t\t\treturn done( error, collection );\n\t\t\t}\n\t\t\tdone( null, collection );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\n/**\n* Invokes a function once for each element in a collection and updates a collection in-place.\n*\n* ## Notes\n*\n* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.\n* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).\n*\n* @param {Collection} collection - input collection\n* @param {Options} [options] - function options\n* @param {*} [options.thisArg] - execution context\n* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time\n* @param {boolean} [options.series=false] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection\n* @param {Function} fcn - function to invoke for each element in a collection\n* @param {Callback} done - function to invoke upon completion\n* @throws {TypeError} first argument must be a collection\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {TypeError} second-to-last argument must be a function\n* @throws {TypeError} last argument must be a function\n* @returns {void}\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n*\n* function done( error, results ) {\n* if ( error ) {\n* throw error;\n* }\n* console.log( results );\n* }\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* inmapAsync( files, read, done );\n*/\nfunction inmapAsync( collection, options, fcn, done ) {\n\tif ( arguments.length < 4 ) {\n\t\treturn factory( options )( collection, fcn );\n\t}\n\tfactory( options, fcn )( collection, done );\n}\n\n\n// EXPORTS //\n\nmodule.exports = inmapAsync;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Invoke a function once for each element in a collection and update a collection in-place.\n*\n* @module @stdlib/utils-async-inmap\n*\n* @example\n* var readFile = require( '@stdlib/fs-read-file' );\n* var inmapAsync = require( '@stdlib/utils-async-inmap' );\n*\n* var files = [\n* './beep.js',\n* './boop.js'\n* ];\n*\n* function done( error, results ) {\n* if ( error ) {\n* return console.error( error.message );\n* }\n* console.log( results );\n* }\n*\n* function read( file, next ) {\n* var opts = {\n* 'encoding': 'utf8'\n* };\n* readFile( file, opts, onFile );\n*\n* function onFile( error, data ) {\n* if ( error ) {\n* error = new Error( 'unable to read file: '+file );\n* return next( error );\n* }\n* next( null, data );\n* }\n* }\n*\n* inmapAsync( files, read, done );\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
5
|
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,gCAAiC,EACrDC,EAAa,QAAS,iCAAkC,EACxDC,EAAY,QAAS,2BAA4B,EAAE,YACnDC,EAAoB,QAAS,oCAAqC,EAAE,YACpEC,EAAS,QAAS,uBAAwB,EA4B9C,SAASC,EAAUC,EAAMC,EAAU,CAClC,OAAMP,EAAUO,CAAQ,GAGnBN,EAAYM,EAAS,SAAU,IACnCD,EAAK,QAAUC,EAAQ,SAEnBN,EAAYM,EAAS,QAAS,IAClCD,EAAK,OAASC,EAAQ,OACjB,CAACL,EAAWI,EAAK,MAAO,GACrB,IAAI,UAAWF,EAAQ,+DAAgE,SAAUE,EAAK,MAAO,CAAE,EAGnHL,EAAYM,EAAS,OAAQ,IACjCD,EAAK,MAAQC,EAAQ,MAChB,CAACJ,EAAmBG,EAAK,KAAM,GAC5B,IAAI,UAAWF,EAAQ,wEAAyE,QAASE,EAAK,KAAM,CAAE,EAGxH,MAjBC,IAAI,UAAWF,EAAQ,qEAAsEG,CAAQ,CAAE,CAkBhH,CAKAR,EAAO,QAAUM,IC/EjB,IAAAG,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAS,QAAS,OAAQ,EAK1BC,EAAQD,EAAQ,mBAAoB,EAiBxC,SAASE,EAAOC,EAAYC,EAAMC,EAAKC,EAAO,CAC7C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAKJ,GAHAF,EAAMR,EAAW,OACjBF,EAAO,wBAAyBU,CAAI,EAE/BA,IAAQ,EACZ,OAAAV,EAAO,mCAAoC,EACpCK,EAAK,EAab,IAXKK,EAAMP,EAAK,MACfM,EAAMC,EAEND,EAAMN,EAAK,MAEZH,EAAO,wBAAyBS,CAAI,EACpCT,EAAO,0BAA2BI,EAAI,MAAO,EAE7CE,EAAWI,EAAM,EACjBH,EAAQ,EACRI,EAAM,GACAC,EAAI,EAAGA,EAAIH,EAAKG,IAEhBD,EAAML,GACVO,EAAK,EAQP,SAASA,GAAO,CACf,IAAIC,EACJH,GAAO,EACPG,EAAIH,EACJX,EAAO,6BAA8Bc,EAAG,KAAK,UAAWZ,EAAYY,CAAE,CAAE,CAAE,EACrEV,EAAI,SAAW,EACnBA,EAAI,KAAMD,EAAK,QAASD,EAAYY,CAAE,EAAGC,CAAG,EACjCX,EAAI,SAAW,EAC1BA,EAAI,KAAMD,EAAK,QAASD,EAAYY,CAAE,EAAGA,EAAGC,CAAG,EAE/CX,EAAI,KAAMD,EAAK,QAASD,EAAYY,CAAE,EAAGA,EAAGZ,EAAYa,CAAG,EAU5D,SAASA,EAAIC,EAAOC,EAAS,CAC5B,GAAK,CAAAT,EAIL,IAAKQ,EACJ,OAAAR,EAAM,GACCU,EAAMF,CAAM,EAEpBd,EAAYY,CAAE,EAAIG,EAClBC,EAAK,EACN,CACD,CASA,SAASA,EAAMF,EAAQ,CACtB,GAAKA,EACJ,OAAAhB,EAAO,2BAA4BgB,EAAM,OAAQ,EAC1CX,EAAMW,CAAM,EAIpB,GAFAT,GAAS,EACTP,EAAO,0CAA2CO,EAAOG,CAAI,EACxDC,EAAML,EACV,OAAOO,EAAK,EAEb,GAAKN,IAAUG,EACd,OAAAV,EAAO,mCAAoC,EACpCK,EAAK,CAEd,CACD,CAKAP,EAAO,QAAUG,IC/IjB,IAAAkB,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAa,QAAS,4BAA6B,EACnDC,EAAe,QAAS,8BAA+B,EACvDC,EAAS,QAAS,uBAAwB,EAC1CC,EAAO,QAAS,gCAAiC,EACjDC,EAAW,IACXC,EAAQ,IAgEZ,SAASC,EAASC,EAASC,EAAM,CAChC,IAAIC,EACAC,EACAC,EAGJ,GADAF,EAAO,CAAC,EACH,UAAU,OAAS,EAAI,CAE3B,GADAC,EAAMN,EAAUK,EAAMF,CAAQ,EACzBG,EACJ,MAAMA,EAEPC,EAAIH,CACL,MACCG,EAAIJ,EAEL,GAAK,CAACP,EAAYW,CAAE,EACnB,MAAM,IAAI,UAAWT,EAAQ,mEAAoES,CAAE,CAAE,EAEtG,OAAKF,EAAK,OACTA,EAAK,MAAQ,EACDA,EAAK,QACjBA,EAAK,MAAQN,GAEPS,EAYP,SAASA,EAAYC,EAAYC,EAAO,CACvC,GAAK,CAACb,EAAcY,CAAW,EAC9B,MAAM,IAAI,UAAWX,EAAQ,sEAAuEW,CAAW,CAAE,EAElH,GAAK,CAACb,EAAYc,CAAK,EACtB,MAAM,IAAI,UAAWZ,EAAQ,mEAAoEY,CAAK,CAAE,EAEzG,OAAOT,EAAOQ,EAAYJ,EAAME,EAAGI,CAAK,EASxC,SAASA,EAAMC,EAAQ,CACtB,GAAKA,EACJ,OAAOF,EAAME,EAAOH,CAAW,EAEhCC,EAAM,KAAMD,CAAW,CACxB,CACD,CACD,CAKAd,EAAO,QAAUO,IC1JjB,IAAAW,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,IA0Dd,SAASC,EAAYC,EAAYC,EAASC,EAAKC,EAAO,CACrD,GAAK,UAAU,OAAS,EACvB,OAAOL,EAASG,CAAQ,EAAGD,EAAYE,CAAI,EAE5CJ,EAASG,EAASC,CAAI,EAAGF,EAAYG,CAAK,CAC3C,CAKAN,EAAO,QAAUE,IC7BjB,IAAIK,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD",
|
|
6
6
|
"names": ["require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isBoolean", "isPositiveInteger", "format", "validate", "opts", "options", "require_limit", "__commonJSMin", "exports", "module", "logger", "debug", "limit", "collection", "opts", "fcn", "done", "maxIndex", "count", "flg", "lim", "len", "idx", "i", "next", "j", "cb", "error", "result", "clbk", "require_factory", "__commonJSMin", "exports", "module", "isFunction", "isCollection", "format", "PINF", "validate", "limit", "factory", "options", "fcn", "opts", "err", "f", "inmapAsync", "collection", "done", "clbk", "error", "require_main", "__commonJSMin", "exports", "module", "factory", "inmapAsync", "collection", "options", "fcn", "done", "setReadOnly", "main", "factory"]
|
|
7
7
|
}
|
package/docs/types/index.d.ts
CHANGED
|
@@ -275,7 +275,7 @@ interface InMapAsync {
|
|
|
275
275
|
* };
|
|
276
276
|
*
|
|
277
277
|
* // Create a `inmapAsync` function which invokes `read` for each collection element sequentially:
|
|
278
|
-
* var
|
|
278
|
+
* var inmap = inmapAsync.factory( opts, read );
|
|
279
279
|
*
|
|
280
280
|
* // Create a collection over which to iterate:
|
|
281
281
|
* var files = [
|
|
@@ -292,7 +292,7 @@ interface InMapAsync {
|
|
|
292
292
|
* }
|
|
293
293
|
*
|
|
294
294
|
* // Run `read` for each element in `files`:
|
|
295
|
-
*
|
|
295
|
+
* inmap( files, done );
|
|
296
296
|
*/
|
|
297
297
|
factory<T = unknown, U = unknown, V = unknown>( options: Options<T, U, V>, fcn: Fcn<T, U, V> ): FactoryFunction<T, U>;
|
|
298
298
|
|
|
@@ -326,7 +326,7 @@ interface InMapAsync {
|
|
|
326
326
|
* }
|
|
327
327
|
*
|
|
328
328
|
* // Create a `inmapAsync` function which invokes `read` for each collection element sequentially:
|
|
329
|
-
* var
|
|
329
|
+
* var inmap = inmapAsync.factory( read );
|
|
330
330
|
*
|
|
331
331
|
* // Create a collection over which to iterate:
|
|
332
332
|
* var files = [
|
|
@@ -343,7 +343,7 @@ interface InMapAsync {
|
|
|
343
343
|
* }
|
|
344
344
|
*
|
|
345
345
|
* // Run `read` for each element in `files`:
|
|
346
|
-
*
|
|
346
|
+
* inmap( files, done );
|
|
347
347
|
*/
|
|
348
348
|
factory<T = unknown, U = unknown, V = unknown>( fcn: Fcn<T, U, V> ): FactoryFunction<T, U>;
|
|
349
349
|
}
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/utils-async-inmap",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Invoke a function for each element in a collection and update the collection in-place.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@stdlib/assert-has-own-property": "^0.2.
|
|
34
|
-
"@stdlib/assert-is-boolean": "^0.2.
|
|
35
|
-
"@stdlib/assert-is-collection": "^0.2.
|
|
36
|
-
"@stdlib/assert-is-function": "^0.2.
|
|
37
|
-
"@stdlib/assert-is-plain-object": "^0.2.
|
|
38
|
-
"@stdlib/assert-is-positive-integer": "^0.2.
|
|
39
|
-
"@stdlib/constants-float64-pinf": "^0.2.
|
|
40
|
-
"@stdlib/string-format": "^0.2.
|
|
41
|
-
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.
|
|
33
|
+
"@stdlib/assert-has-own-property": "^0.2.3",
|
|
34
|
+
"@stdlib/assert-is-boolean": "^0.2.3",
|
|
35
|
+
"@stdlib/assert-is-collection": "^0.2.3",
|
|
36
|
+
"@stdlib/assert-is-function": "^0.2.3",
|
|
37
|
+
"@stdlib/assert-is-plain-object": "^0.2.3",
|
|
38
|
+
"@stdlib/assert-is-positive-integer": "^0.2.3",
|
|
39
|
+
"@stdlib/constants-float64-pinf": "^0.2.3",
|
|
40
|
+
"@stdlib/string-format": "^0.2.3",
|
|
41
|
+
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3",
|
|
42
42
|
"debug": "^2.6.9",
|
|
43
|
-
"@stdlib/error-tools-fmtprodmsg": "^0.2.
|
|
43
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.2.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {},
|
|
46
46
|
"engines": {
|