@stdlib/utils-async-map-keys 0.0.4 → 0.0.8
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 +36 -2
- package/docs/types/index.d.ts +2 -2
- package/lib/limit.js +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -5
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2022 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
# mapKeysAsync
|
|
22
22
|
|
|
23
|
-
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
|
|
23
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
24
24
|
|
|
25
25
|
> Map keys from one object to a new object having the same values.
|
|
26
26
|
|
|
@@ -369,6 +369,21 @@ mapKeysAsync( files, read, done );
|
|
|
369
369
|
|
|
370
370
|
<!-- /.references -->
|
|
371
371
|
|
|
372
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
373
|
+
|
|
374
|
+
<section class="related">
|
|
375
|
+
|
|
376
|
+
* * *
|
|
377
|
+
|
|
378
|
+
## See Also
|
|
379
|
+
|
|
380
|
+
- <span class="package-name">[`@stdlib/utils/map-keys`][@stdlib/utils/map-keys]</span><span class="delimiter">: </span><span class="description">map keys from one object to a new object having the same values.</span>
|
|
381
|
+
- <span class="package-name">[`@stdlib/utils/async/map-values`][@stdlib/utils/async/map-values]</span><span class="delimiter">: </span><span class="description">map values from one object to a new object having the same keys.</span>
|
|
382
|
+
|
|
383
|
+
</section>
|
|
384
|
+
|
|
385
|
+
<!-- /.related -->
|
|
386
|
+
|
|
372
387
|
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
373
388
|
|
|
374
389
|
|
|
@@ -395,7 +410,7 @@ See [LICENSE][stdlib-license].
|
|
|
395
410
|
|
|
396
411
|
## Copyright
|
|
397
412
|
|
|
398
|
-
Copyright © 2016-
|
|
413
|
+
Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
399
414
|
|
|
400
415
|
</section>
|
|
401
416
|
|
|
@@ -414,9 +429,20 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
414
429
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-async-map-keys/main.svg
|
|
415
430
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-async-map-keys?branch=main
|
|
416
431
|
|
|
432
|
+
<!--
|
|
433
|
+
|
|
417
434
|
[dependencies-image]: https://img.shields.io/david/stdlib-js/utils-async-map-keys.svg
|
|
418
435
|
[dependencies-url]: https://david-dm.org/stdlib-js/utils-async-map-keys/main
|
|
419
436
|
|
|
437
|
+
-->
|
|
438
|
+
|
|
439
|
+
[umd]: https://github.com/umdjs/umd
|
|
440
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
441
|
+
|
|
442
|
+
[deno-url]: https://github.com/stdlib-js/utils-async-map-keys/tree/deno
|
|
443
|
+
[umd-url]: https://github.com/stdlib-js/utils-async-map-keys/tree/umd
|
|
444
|
+
[esm-url]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm
|
|
445
|
+
|
|
420
446
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
421
447
|
[chat-url]: https://gitter.im/stdlib-js/stdlib/
|
|
422
448
|
|
|
@@ -428,6 +454,14 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
428
454
|
|
|
429
455
|
[ecma-262]: http://www.ecma-international.org/ecma-262/5.1/#sec-12.6.4
|
|
430
456
|
|
|
457
|
+
<!-- <related-links> -->
|
|
458
|
+
|
|
459
|
+
[@stdlib/utils/map-keys]: https://www.npmjs.com/package/@stdlib/utils-map-keys
|
|
460
|
+
|
|
461
|
+
[@stdlib/utils/async/map-values]: https://www.npmjs.com/package/@stdlib/utils-async-map-values
|
|
462
|
+
|
|
463
|
+
<!-- </related-links> -->
|
|
464
|
+
|
|
431
465
|
</section>
|
|
432
466
|
|
|
433
467
|
<!-- /.links -->
|
package/docs/types/index.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ type BinaryTransform = ( value: any, next: Callback ) => void;
|
|
|
109
109
|
* @param value - object value corresponding to `key`
|
|
110
110
|
* @param next - a callback to be invoked after processing an object `value`
|
|
111
111
|
*/
|
|
112
|
-
type
|
|
112
|
+
type TernaryTransform = ( value: any, index: number, next: Callback ) => void;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Transform function.
|
|
@@ -129,7 +129,7 @@ type QuaternaryTransform = ( value: any, index: number, obj: any, next: Callback
|
|
|
129
129
|
* @param obj - the input object
|
|
130
130
|
* @param next - a callback to be invoked after processing an object `value`
|
|
131
131
|
*/
|
|
132
|
-
type Transform = Unary | BinaryTransform |
|
|
132
|
+
type Transform = Unary | BinaryTransform | TernaryTransform | QuaternaryTransform; // tslint-disable-line max-line-length
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Maps keys from one object to a new object having the same values.
|
package/lib/limit.js
CHANGED
|
@@ -83,7 +83,7 @@ function limit( obj, opts, fcn, done ) {
|
|
|
83
83
|
for ( i = 0; i < lim; i++ ) {
|
|
84
84
|
// This guard is necessary to protect against synchronous functions which exhaust all properties...
|
|
85
85
|
if ( idx < maxIndex ) {
|
|
86
|
-
next(); // eslint-disable-line callback-return
|
|
86
|
+
next(); // eslint-disable-line node/callback-return
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
/**
|
package/package.json
CHANGED