Dashboard sipadu mbip
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict';
  2. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  3. module.exports = function take(length) {
  4. var _this = this;
  5. if (!Array.isArray(this.items) && _typeof(this.items) === 'object') {
  6. var keys = Object.keys(this.items);
  7. var slicedKeys = void 0;
  8. if (length < 0) {
  9. slicedKeys = keys.slice(length);
  10. } else {
  11. slicedKeys = keys.slice(0, length);
  12. }
  13. var collection = {};
  14. keys.forEach(function (prop) {
  15. if (slicedKeys.indexOf(prop) !== -1) {
  16. collection[prop] = _this.items[prop];
  17. }
  18. });
  19. return new this.constructor(collection);
  20. }
  21. if (length < 0) {
  22. return new this.constructor(this.items.slice(length));
  23. }
  24. return new this.constructor(this.items.slice(0, length));
  25. };