Skip to Content
utilstoRootRelativePath

toRootRelativePath

See source on Github

Transforms a given path to be root relative.

Example

toRootRelativePath('foo/bar') // '/foo/bar' toRootRelativePath('/foo/bar') // '/foo/bar' toRootRelativePath('http://google.com/foo/bar') // 'http://google.com/foo/bar'

See