New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce dependency on lodash functions: includes, uniq, repeat, isinteger #11790
Reduce dependency on lodash functions: includes, uniq, repeat, isinteger #11790
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ad95ab8:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/25373/ |
packages/babel-helper-transform-fixture-test-runner/src/index.js
Outdated
Show resolved
Hide resolved
After that this PR and the other one are merged to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! 🎉
Awesome! I think for - const args = values(outsideRefs).map(id => t.cloneNode(id));
+ const args = Object.keys(outsideRefs).map((ref) => t.cloneNode(outsideRefs[ref])); |
Yep, thanks - good idea! See follow-up #11798 for a replacement of |
This change incorporates feedback from #11789 - in particular, the following
lodash
functions are replaced with JavaScript built-in functions:lodash/includes
is replaced byArray.prototype.includes
lodash/values
is replaced byObject.values
Object.values
is fully-supported from Node 7.xlodash/uniq
is replaced byArray.from(new Set(...))
lodash.repeat
is replaced byString.prototype.repeat
lodash.isinteger
is replaced byNumber.isInteger