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
Replace lodash 'isPlainObject' usage with is-plain-object library #11855
Replace lodash 'isPlainObject' usage with is-plain-object library #11855
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 39bae07:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/26196/ |
The two implementations seem to differ when determining whether an object created by using > isplainobject_standalone = require('is-plain-object');
[Function: isPlainObject]
> isplainobject_lodash = require('lodash/isPlainObject');
[Function: isPlainObject]
> var x = Object.create(null);
undefined
> isplainobject_standalone(x);
false
> isplainobject_lodash(x);
true |
Fixed this. Try v4 |
(switching to draft because I'm not sure what factors should determine the approach between this and #11859) |
Any reason we can't just use lodash.isplainobject instead? I don't think we need to get rid of lodash entirely, but it would be great if we could just install the utils we're using individually. |
|
Ah, okay, that's a very good reason 👍 |
Closing given a marginal preference for #11859 instead. |
As per feedback in #11789 (comment), this is another instance of a
lodash
function that can be replaced by a standalone library.