summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/array/array_replace.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/locutus/php/array/array_replace.js.map')
-rw-r--r--node_modules/locutus/php/array/array_replace.js.map1
1 files changed, 0 insertions, 1 deletions
diff --git a/node_modules/locutus/php/array/array_replace.js.map b/node_modules/locutus/php/array/array_replace.js.map
deleted file mode 100644
index 821f45d..0000000
--- a/node_modules/locutus/php/array/array_replace.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_replace.js"],"names":["module","exports","array_replace","arr","retObj","i","p","argl","arguments","length","Error"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,GAAxB,EAA6B;AAAE;AAC9C;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,OAAOC,UAAUC,MAArB;;AAEA,MAAIF,OAAO,CAAX,EAAc;AACZ,UAAM,IAAIG,KAAJ,CAAU,gEAAV,CAAN;AACD;;AAED;AACA;AACA;AACA,OAAKJ,CAAL,IAAUH,GAAV,EAAe;AACbC,WAAOE,CAAP,IAAYH,IAAIG,CAAJ,CAAZ;AACD;;AAED,OAAKD,IAAI,CAAT,EAAYA,IAAIE,IAAhB,EAAsBF,GAAtB,EAA2B;AACzB,SAAKC,CAAL,IAAUE,UAAUH,CAAV,CAAV,EAAwB;AACtBD,aAAOE,CAAP,IAAYE,UAAUH,CAAV,EAAaC,CAAb,CAAZ;AACD;AACF;;AAED,SAAOF,MAAP;AACD,CA7BD","file":"array_replace.js","sourcesContent":["module.exports = function array_replace (arr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_replace/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_replace([\"orange\", \"banana\", \"apple\", \"raspberry\"], {0 : \"pineapple\", 4 : \"cherry\"}, {0:\"grape\"})\n // returns 1: {0: 'grape', 1: 'banana', 2: 'apple', 3: 'raspberry', 4: 'cherry'}\n\n var retObj = {}\n var i = 0\n var p = ''\n var argl = arguments.length\n\n if (argl < 2) {\n throw new Error('There should be at least 2 arguments passed to array_replace()')\n }\n\n // Although docs state that the arguments are passed in by reference,\n // it seems they are not altered, but rather the copy that is returned\n // (just guessing), so we make a copy here, instead of acting on arr itself\n for (p in arr) {\n retObj[p] = arr[p]\n }\n\n for (i = 1; i < argl; i++) {\n for (p in arguments[i]) {\n retObj[p] = arguments[i][p]\n }\n }\n\n return retObj\n}\n"]} \ No newline at end of file