joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 772 forks source link

Remove lodash import #557

Closed nickeng closed 2 years ago

nickeng commented 4 years ago

In this instance lodash does not simplify the code and leads to a ~70kb increase in minified bundle size. The lodash dependency already does not exist in package.json so there is no need to update the file after removing its usage.

wbercx commented 4 years ago

Thanks for catching this, I had no idea!

I've taken it for a spin in my own fork, and it failed immediately due to headers being undefined. I ended up making the following change:

- let [method, url, headers, body] = [...args]
+ let [method, url, headers = {}, body] = [...args]
nickeng commented 4 years ago

sorry about that 😅 updated to handle undefined/null headers

vovkasm commented 3 years ago

Can this PR be merged please?

R4DIC4L commented 3 years ago

Unfortunately, I believe this repo is no longer maintained. Although there are a couple good PRs here.

laurent22 commented 1 year ago

Why was this PR closed, that was a very good and simple change. In fact currently the package breaks in projects that don't already include lodash, so it should be removed or added to package.json.