ensure-plain-object.js 317 B

12345678910111213141516
  1. "use strict";
  2. module.exports = function (t, a) {
  3. // Just sanity checks, as logic is tested at isPlainFunction
  4. var obj = {};
  5. a(t(obj), obj, "Reguar object instance");
  6. obj = Object.create(null);
  7. a(t(obj), obj, "Null prototype");
  8. a.throws(
  9. function () {
  10. t(function () {});
  11. },
  12. TypeError,
  13. "Error"
  14. );
  15. };