unpkg/modules/utils/addLeadingSlash.js

6 lines
123 B
JavaScript
Raw Normal View History

function addLeadingSlash(name) {
return name.charAt(0) === "/" ? name : "/" + name;
}
module.exports = addLeadingSlash;