6 lines
123 B
JavaScript
6 lines
123 B
JavaScript
|
function addLeadingSlash(name) {
|
||
|
return name.charAt(0) === "/" ? name : "/" + name;
|
||
|
}
|
||
|
|
||
|
module.exports = addLeadingSlash;
|