Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
yh_vendor
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
于良
9 years ago
Commit
474b7bca34575ec8457eed8fb5dbbda3049279b0
1 parent
27f6368a
修正方法名称 review by yewanwan
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
js/utils/trimObject.js
js/utils/trimObject.js
View file @
474b7bc
...
...
@@ -6,7 +6,7 @@ export default function trimObject(obj) {
}
return
Object
.
keys
(
obj
).
reduce
(
function
(
acc
,
key
)
{
acc
[
key
.
trim
()]
=
typeof
obj
[
key
]
==
'string'
?
obj
[
key
].
trim
()
:
trimObj
(
obj
[
key
]);
acc
[
key
.
trim
()]
=
typeof
obj
[
key
]
==
'string'
?
obj
[
key
].
trim
()
:
trimObj
ect
(
obj
[
key
]);
return
acc
;
},
Array
.
isArray
(
obj
)
?
[]
:
{});
}
...
...
Please
register
or
login
to post a comment