Skip to content

Conversation

fleck
Copy link
Contributor

@fleck fleck commented Jan 27, 2021

Trying to use this function with map https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map and getting the error:

TypeError: cb is not a function

This change will allow this package to work with map.

Trying to use this function with map https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map and getting the error:

```
TypeError: cb is not a function
```

This change will allow this package to work with map.
@fleck fleck changed the title make this work with map allow this work with map Jan 27, 2021
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f61730e on fleck:patch-1 into ebb3c7d on adamreisnz:master.

@fleck
Copy link
Contributor Author

fleck commented Jan 27, 2021

The reason I want to map this is so I can can send it to promise.all:

  await Promise.all(
    [
      {
        files: [
          join(sfUi, ".eslintrc"),
          join(sfUi, "@types", "store", "index.d.ts"),
          join(sfUi, "stories/productListing.stories.tsx"),
          join(sfUi, "tsconfig.json"),
          join(sfUi, "jest.config.js"),
        ],
        from: /html\/template\/site2012\/lib\/js/g,
        to: "src",
      },
    ...Other transform options
    ].map(replaceInFile)
  )

@adamreisnz
Copy link
Owner

That looks like a reasonable change to me, thank you :)

@adamreisnz adamreisnz merged commit 1760fbe into adamreisnz:master Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants