verifyPlainObject.js 295 B

1234567
  1. import isPlainObject from './isPlainObject';
  2. import warning from './warning';
  3. export default function verifyPlainObject(value, displayName, methodName) {
  4. if (!isPlainObject(value)) {
  5. warning(`${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`);
  6. }
  7. }