Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
yyq
2017-06-12 11:26:11 +0800
Commit
18a5ce656a18f2cbafbc2130f2cf27ccd4ae849f
1 parent
ff206caa
upper
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 @
18a5ce6
'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