Ensure leading slash, if str does not start with slash, it will be added
确保前缀,如果字符串不以斜杠开头,则将添加斜杠
ensureLeadingSlash('foo/bar') // => /foo/bar Copy
ensureLeadingSlash('foo/bar') // => /foo/bar
Ensure leading slash, if str does not start with slash, it will be added
确保前缀,如果字符串不以斜杠开头,则将添加斜杠