HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/tana/frontend/node_modules/locutus/php/array/array_pop.js.map
{"version":3,"sources":["../../../src/php/array/array_pop.js"],"names":["module","exports","array_pop","inputArr","key","lastKey","hasOwnProperty","length","pop","tmp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,UAAU,EAAd;;AAEA,MAAIF,SAASG,cAAT,CAAwB,QAAxB,CAAJ,EAAuC;AACrC;AACA,QAAI,CAACH,SAASI,MAAd,EAAsB;AACpB;AACA,aAAO,IAAP;AACD;AACD,WAAOJ,SAASK,GAAT,EAAP;AACD,GAPD,MAOO;AACL;AACA,SAAKJ,GAAL,IAAYD,QAAZ,EAAsB;AACpB,UAAIA,SAASG,cAAT,CAAwBF,GAAxB,CAAJ,EAAkC;AAChCC,kBAAUD,GAAV;AACD;AACF;AACD,QAAIC,OAAJ,EAAa;AACX,UAAII,MAAMN,SAASE,OAAT,CAAV;AACA,aAAQF,SAASE,OAAT,CAAR;AACA,aAAOI,GAAP;AACD,KAJD,MAIO;AACL,aAAO,IAAP;AACD;AACF;AACF,CA9CD","file":"array_pop.js","sourcesContent":["module.exports = function array_pop (inputArr) { // eslint-disable-line camelcase\n  //  discuss at: http://locutus.io/php/array_pop/\n  // original by: Kevin van Zonneveld (http://kvz.io)\n  // improved by: Kevin van Zonneveld (http://kvz.io)\n  //    input by: Brett Zamir (http://brett-zamir.me)\n  //    input by: Theriault (https://github.com/Theriault)\n  // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n  // bugfixed by: Brett Zamir (http://brett-zamir.me)\n  //      note 1: While IE (and other browsers) support iterating an object's\n  //      note 1: own properties in order, if one attempts to add back properties\n  //      note 1: in IE, they may end up in their former position due to their position\n  //      note 1: being retained. So use of this function with \"associative arrays\"\n  //      note 1: (objects) may lead to unexpected behavior in an IE environment if\n  //      note 1: you add back properties with the same keys that you removed\n  //   example 1: array_pop([0,1,2])\n  //   returns 1: 2\n  //   example 2: var $data = {firstName: 'Kevin', surName: 'van Zonneveld'}\n  //   example 2: var $lastElem = array_pop($data)\n  //   example 2: var $result = $data\n  //   returns 2: {firstName: 'Kevin'}\n\n  var key = ''\n  var lastKey = ''\n\n  if (inputArr.hasOwnProperty('length')) {\n    // Indexed\n    if (!inputArr.length) {\n      // Done popping, are we?\n      return null\n    }\n    return inputArr.pop()\n  } else {\n    // Associative\n    for (key in inputArr) {\n      if (inputArr.hasOwnProperty(key)) {\n        lastKey = key\n      }\n    }\n    if (lastKey) {\n      var tmp = inputArr[lastKey]\n      delete (inputArr[lastKey])\n      return tmp\n    } else {\n      return null\n    }\n  }\n}\n"]}