Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
OF1706
2017-06-12 11:25:00 +0800
Commit
db466aa8355812b37bb4f3e3a02f0d36a009bea3
1 parent
96f43285
suggetList
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
utils/string-code.js
utils/string-code.js
View file @
db466aa
'use strict'
;
const
_
=
require
(
'lodash'
);
const
utf8ToHex
=
(
string
)
=>
{
var
buf
=
new
Buffer
(
string
,
'utf8'
);
return
buf
.
toString
(
'hex'
);
return
_
.
toUpper
(
buf
.
toString
(
'hex'
)
);
};
const
hexToUtf8
=
(
string
)
=>
{
...
...
Please
register
or
login
to post a comment