UNPKG
@lund-org/cherry
Version:
latest (0.2.2)
0.2.2
0.2.1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
0.0.1
A light framework to quickly create a web server
github.com/Lund-Org/cherry
Lund-Org/cherry
@lund-org/cherry
/
src
/
helpers
/
format.js
15 lines
(13 loc)
•
259 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module
.
exports
= {
/** * Add a slash at the end of the url if it's not already there *
@param
{string} url An url *
@return
{string} */
refineUrl (url) {
if
(!url.endsWith(
'/'
)) { url +=
'/'
}
return
url } }