first-key.js 349 B

12345678910111213
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var x = {}, y = Object.create(null);
  4. a(t(x), null, "Normal: Empty");
  5. a(t(y), null, "Null extension: Empty");
  6. x.foo = 'raz';
  7. x.bar = 343;
  8. a(['foo', 'bar'].indexOf(t(x)) !== -1, true, "Normal");
  9. y.elo = 'foo';
  10. y.mar = 'wew';
  11. a(['elo', 'mar'].indexOf(t(y)) !== -1, true, "Null extension");
  12. };