UNPKG
create-w3-app
Version:
latest (0.7.1)
0.7.1
0.7.0
0.6.0
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.0
Create ethereum dApps with w3 stack
github.com/gopiinho/create-w3-app
gopiinho/create-w3-app
create-w3-app
/
src
/
utils
/
removeTrailingSlash.ts.ts
8 lines
(6 loc)
•
161 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
export const removeTrailingSlash = (
input
:
string
) => {
if
(
input
.length >
1
&&
input
.endsWith(
"/"
)) {
input
=
input
.slice(
0
,
-1
); }
return
input
; };