Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
T
topjs3-demos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leon Li
topjs3-demos
Commits
56d87c6f
Commit
56d87c6f
authored
Jan 07, 2020
by
Leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload.
parent
65c2f157
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
lodash-map-values.js
src/lodash-map-values.js
+21
-0
utc-wms-dirty-char.js
src/utc-wms-dirty-char.js
+1
-5
No files found.
src/lodash-map-values.js
0 → 100644
View file @
56d87c6f
var
_
=
require
(
"lodash"
);
var
obj
=
{
a
:
"str "
,
b
:
1
,
c
:
0.4
,
d
:
{
d1
:
"str"
},
e
:
[
1
,
2
]
};
print
(
JSON
.
stringify
(
obj
,
null
,
' '
));
obj
=
_
.
mapValues
(
obj
,
function
(
v
)
{
return
_
.
isString
(
v
)
?
v
.
trim
()
:
v
;
});
print
(
JSON
.
stringify
(
obj
,
null
,
' '
));
\ No newline at end of file
src/utc-wms-dirty-char.js
View file @
56d87c6f
...
...
@@ -47,11 +47,7 @@ try {
print
(
"query result: "
,
JSON
.
stringify
(
erp_data
));
erp_data
=
_
.
mapValues
(
erp_data
,
function
(
v
,
k
){
print
(
'-----'
,
k
,
v
,
_
.
isString
(
v
));
if
(
_
.
isString
(
v
))
{
print
(
'+++++'
,
v
.
replace
(
/
\\
u0000/g
,
''
));
}
return
_
.
isString
(
v
)
?
v
.
replace
(
/
\\
u0000/g
,
''
)
:
v
;
return
_
.
isString
(
v
)
?
v
.
replace
(
/
\u
0000/g
,
''
)
:
v
;
});
print
(
"after mapValues: "
,
JSON
.
stringify
(
erp_data
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment