primitive-set.js 449 B

1234567891011121314
  1. "use strict";
  2. var getPropertyNames = require("../../object/get-property-names")
  3. , isPlainObject = require("../../object/is-plain-object");
  4. module.exports = function (t, a) {
  5. var x = t();
  6. a(isPlainObject(x), true, "Plain object");
  7. a.deep(getPropertyNames(x), [], "No properties");
  8. x.foo = "bar";
  9. a.deep(getPropertyNames(x), ["foo"], "Extensible");
  10. a.deep(t("raz", "dwa", 3), { raz: true, dwa: true, 3: true }, "Arguments handling");
  11. };