File manager - Edit - /usr/local/lib/node_modules/bower/lib/node_modules/mout/src/queryString/encode.js
Back
define(['../object/forOwn','../lang/isArray','../array/forEach'], function (forOwn,isArray,forEach) { /** * Encode object into a query string. */ function encode(obj){ var query = [], arrValues, reg; forOwn(obj, function (val, key) { if (isArray(val)) { arrValues = key + '='; reg = new RegExp('&'+key+'+=$'); forEach(val, function (aValue) { arrValues += encodeURIComponent(aValue) + '&' + key + '='; }); query.push(arrValues.replace(reg, '')); } else { query.push(key + '=' + encodeURIComponent(val)); } }); return (query.length) ? '?' + query.join('&') : ''; } return encode; });
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings