We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
function isPlainObject(obj) { if (typeof obj !== "object") { return false; } return Object.getPrototypeOf(obj) === Object.prototype; }
The text was updated successfully, but these errors were encountered:
function isPlainObject(obj) { if (typeof obj !== 'object' || obj === null) { return false; } const proto = Object.getPrototypeOf(obj); if (proto === null) { return true; } let baseProto = proto; while (Object.getPrototypeOf(baseProto) !== null) { baseProto = Object.getPrototypeOf(baseProto); } return proto === baseProto; }
Sorry, something went wrong.
//vue中的判断方法 var _toString = Object.prototype.toString; function isPlainObject(obj) { return _toString.call(obj) === '[object Object]'; }
No branches or pull requests
The text was updated successfully, but these errors were encountered: