unpkg/modules/utils/addLeadingSlash.js

4 lines
103 B
JavaScript
Raw Normal View History

2019-01-06 00:50:05 +00:00
export default function addLeadingSlash(name) {
2018-12-17 17:38:05 +00:00
return name.charAt(0) === '/' ? name : '/' + name;
}