Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shift.js 246B

12345678910111213
  1. 'use strict';
  2. module.exports = function shift() {
  3. if (Array.isArray(this.items)) {
  4. return this.items.shift();
  5. }
  6. var key = Object.keys(this.items)[0];
  7. var value = this.items[key] || null;
  8. delete this.items[key];
  9. return value;
  10. };