ensure-plain-object.js 266 B

123456789
  1. "use strict";
  2. var safeToString = require("../safe-to-string")
  3. , isPlainObject = require("./is-plain-object");
  4. module.exports = function (value) {
  5. if (!isPlainObject(value)) throw new TypeError(safeToString(value) + " is not a plain object");
  6. return value;
  7. };