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/count.js.map
{"version":3,"sources":["../../../src/php/array/count.js"],"names":["module","exports","count","mixedVar","mode","key","cnt","constructor","Array","Object","hasOwnProperty"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,IAA1B,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,MAAM,CAAV;;AAEA,MAAIH,aAAa,IAAb,IAAqB,OAAOA,QAAP,KAAoB,WAA7C,EAA0D;AACxD,WAAO,CAAP;AACD,GAFD,MAEO,IAAIA,SAASI,WAAT,KAAyBC,KAAzB,IAAkCL,SAASI,WAAT,KAAyBE,MAA/D,EAAuE;AAC5E,WAAO,CAAP;AACD;;AAED,MAAIL,SAAS,iBAAb,EAAgC;AAC9BA,WAAO,CAAP;AACD;AACD,MAAIA,SAAS,CAAb,EAAgB;AACdA,WAAO,CAAP;AACD;;AAED,OAAKC,GAAL,IAAYF,QAAZ,EAAsB;AACpB,QAAIA,SAASO,cAAT,CAAwBL,GAAxB,CAAJ,EAAkC;AAChCC;AACA,UAAIF,SAAS,CAAT,IAAcD,SAASE,GAAT,CAAd,KACDF,SAASE,GAAT,EAAcE,WAAd,KAA8BC,KAA9B,IACCL,SAASE,GAAT,EAAcE,WAAd,KAA8BE,MAF9B,CAAJ,EAE2C;AACzCH,eAAOJ,MAAMC,SAASE,GAAT,CAAN,EAAqB,CAArB,CAAP;AACD;AACF;AACF;;AAED,SAAOC,GAAP;AACD,CAzCD","file":"count.js","sourcesContent":["module.exports = function count (mixedVar, mode) {\n  //  discuss at: http://locutus.io/php/count/\n  // original by: Kevin van Zonneveld (http://kvz.io)\n  //    input by: Waldo Malqui Silva (http://waldo.malqui.info)\n  //    input by: merabi\n  // bugfixed by: Soren Hansen\n  // bugfixed by: Olivier Louvignes (http://mg-crea.com/)\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  //   example 1: count([[0,0],[0,-4]], 'COUNT_RECURSIVE')\n  //   returns 1: 6\n  //   example 2: count({'one' : [1,2,3,4,5]}, 'COUNT_RECURSIVE')\n  //   returns 2: 6\n\n  var key\n  var cnt = 0\n\n  if (mixedVar === null || typeof mixedVar === 'undefined') {\n    return 0\n  } else if (mixedVar.constructor !== Array && mixedVar.constructor !== Object) {\n    return 1\n  }\n\n  if (mode === 'COUNT_RECURSIVE') {\n    mode = 1\n  }\n  if (mode !== 1) {\n    mode = 0\n  }\n\n  for (key in mixedVar) {\n    if (mixedVar.hasOwnProperty(key)) {\n      cnt++\n      if (mode === 1 && mixedVar[key] &&\n        (mixedVar[key].constructor === Array ||\n          mixedVar[key].constructor === Object)) {\n        cnt += count(mixedVar[key], 1)\n      }\n    }\n  }\n\n  return cnt\n}\n"]}