unpkg/modules/utils/addLeadingSlash.js

6 lines
123 B
JavaScript
Raw Normal View History

function addLeadingSlash(name) {
2018-12-17 17:38:05 +00:00
return name.charAt(0) === '/' ? name : '/' + name;
}
module.exports = addLeadingSlash;