-first commit
This commit is contained in:
11
exthernal-accountingwep-api/src/utils/trim.js
Normal file
11
exthernal-accountingwep-api/src/utils/trim.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export function trim_all_array(data) {
|
||||
if (!Array.isArray(data)) return data
|
||||
for (let row of data) {
|
||||
for (let key in row) {
|
||||
if (typeof row[key] === 'string') {
|
||||
row[key] = row[key].trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
return data
|
||||
}
|
||||
Reference in New Issue
Block a user