logoots-utils
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "logoots-utils", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Helper providing several function manipulating strings or arrays", | ||
@@ -5,0 +5,0 @@ "main": "utils.js", |
@@ -65,3 +65,3 @@ module.exports = { | ||
var i; | ||
console.log('On tente de copier : ', arr); | ||
for(i=0; i<arr.length; i++) { | ||
@@ -71,5 +71,8 @@ if(typeof arr[i] === "number" || typeof arr[i] === "string") { | ||
} | ||
else if(typeof arr[i] === "object") { | ||
else if(arr[i].copy !== undefined) { | ||
copy.push(arr[i].copy()); | ||
} | ||
else { | ||
copy.push(arr[i]); | ||
} | ||
} | ||
@@ -76,0 +79,0 @@ return copy; |
3045
102