Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
7ff73d54
Commit
7ff73d54
authored
5 years ago
by
Sasha Ilieva
Browse files
Options
Downloads
Patches
Plain Diff
Convert functions to arrow functions
parent
c4cd9121
No related branches found
No related tags found
1 merge request
!48
269 implement workflow for signing already uploaded document dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
javascript/src/utilities/stringUtilities.js
+6
-6
6 additions, 6 deletions
javascript/src/utilities/stringUtilities.js
with
6 additions
and
6 deletions
javascript/src/utilities/stringUtilities.js
+
6
−
6
View file @
7ff73d54
export
function
stringToUtf8ByteArray
(
str
)
{
export
const
stringToUtf8ByteArray
=
(
str
)
=>
{
if
(
typeof
str
!==
'
string
'
)
{
if
(
typeof
str
!==
'
string
'
)
{
str
=
str
.
toString
();
str
=
str
.
toString
();
}
}
...
@@ -6,7 +6,7 @@ export function stringToUtf8ByteArray(str) {
...
@@ -6,7 +6,7 @@ export function stringToUtf8ByteArray(str) {
return
res
;
return
res
;
}
}
export
function
utf8ByteArrayToString
(
ba
)
{
export
const
utf8ByteArrayToString
=
(
ba
)
=>
{
if
(
!
Buffer
.
isBuffer
(
ba
))
{
if
(
!
Buffer
.
isBuffer
(
ba
))
{
ba
=
Buffer
.
from
(
ba
);
ba
=
Buffer
.
from
(
ba
);
}
}
...
@@ -14,7 +14,7 @@ export function utf8ByteArrayToString(ba) {
...
@@ -14,7 +14,7 @@ export function utf8ByteArrayToString(ba) {
return
res
;
return
res
;
}
}
export
function
stringToUtf8Base64
(
str
)
{
export
const
stringToUtf8Base64
=
(
str
)
=>
{
if
(
!
Buffer
.
isBuffer
(
str
))
{
if
(
!
Buffer
.
isBuffer
(
str
))
{
if
(
typeof
str
!==
'
string
'
)
{
if
(
typeof
str
!==
'
string
'
)
{
str
=
str
.
toString
();
str
=
str
.
toString
();
...
@@ -25,7 +25,7 @@ export function stringToUtf8Base64(str) {
...
@@ -25,7 +25,7 @@ export function stringToUtf8Base64(str) {
return
res
;
return
res
;
}
}
export
function
utf8Base64ToString
(
strBase64
)
{
export
const
utf8Base64ToString
=
(
strBase64
)
=>
{
if
(
!
Buffer
.
isBuffer
(
strBase64
))
{
if
(
!
Buffer
.
isBuffer
(
strBase64
))
{
if
(
typeof
strBase64
!==
'
string
'
)
{
if
(
typeof
strBase64
!==
'
string
'
)
{
strBase64
=
strBase64
.
toString
();
strBase64
=
strBase64
.
toString
();
...
@@ -36,7 +36,7 @@ export function utf8Base64ToString(strBase64) {
...
@@ -36,7 +36,7 @@ export function utf8Base64ToString(strBase64) {
return
res
;
return
res
;
}
}
export
function
base64ToByteArray
(
strBase64
)
{
export
const
base64ToByteArray
=
(
strBase64
)
=>
{
if
(
typeof
strBase64
!==
'
string
'
)
{
if
(
typeof
strBase64
!==
'
string
'
)
{
strBase64
=
strBase64
.
toString
();
strBase64
=
strBase64
.
toString
();
}
}
...
@@ -44,7 +44,7 @@ export function base64ToByteArray(strBase64) {
...
@@ -44,7 +44,7 @@ export function base64ToByteArray(strBase64) {
return
res
;
return
res
;
}
}
export
function
byteArrayToBase64
(
ba
)
{
export
const
byteArrayToBase64
=
(
ba
)
=>
{
if
(
!
Buffer
.
isBuffer
(
ba
))
{
if
(
!
Buffer
.
isBuffer
(
ba
))
{
ba
=
Buffer
.
from
(
ba
);
ba
=
Buffer
.
from
(
ba
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment