File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1919
2020const debug = require ( "debug" ) ( _PKG_NAME )
2121
22- const emptyReturn = { }
23-
2422/**
2523 * Converts an array to an object with static keys and customizable values
2624 * @example
@@ -42,7 +40,7 @@ const emptyReturn = {}
4240 */
4341export default ( array , valueGenerator = null ) => {
4442 if ( ! Array . isArray ( array ) || ! array . length ) {
45- return emptyReturn
43+ return { }
4644 }
4745 const object = { }
4846 if ( typeof valueGenerator === "function" ) {
@@ -84,7 +82,7 @@ export default (array, valueGenerator = null) => {
8482 */
8583export const parallel = async ( array , valueGenerator = null ) => {
8684 if ( ! Array . isArray ( array ) || ! array . length ) {
87- return emptyReturn
85+ return { }
8886 }
8987 const object = { }
9088 if ( typeof valueGenerator === "function" ) {
You can’t perform that action at this time.
0 commit comments