UNPKG
react-okr-ui
Version:
latest (0.1.1)
0.1.1
0.1.0
A React user interface toolkit for building OKR centric applications.
react-okr-ui
/
.docz
/
.cache
/
normalize-page-path.js
13 lines
(12 loc)
•
209 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export default
path
=> {
if
(
path
=== undefined) {
return
path
}
if
(
path
=== `/`) {
return
`/` }
if
(
path
.charAt(
path
.length -
1
) === `/`) {
return
path
.slice(
0
,
-1
) }
return
path
}