verifyPlainObject.js 563 B

12345678910111213141516
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
  3. exports.__esModule = true;
  4. exports["default"] = verifyPlainObject;
  5. var _isPlainObject = _interopRequireDefault(require("./isPlainObject"));
  6. var _warning = _interopRequireDefault(require("./warning"));
  7. function verifyPlainObject(value, displayName, methodName) {
  8. if (!(0, _isPlainObject["default"])(value)) {
  9. (0, _warning["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
  10. }
  11. }