Say I have a string for the full path of a directory
let myPath = '/go/src/github.com/MyDomain/MyProject'
I would like to have an array like
['go', 'src', 'github.com', 'MyDomain', 'MyProject']
What is the best way of doing that ? I would prefer to make this platform agnostic. So if there is a
split() function tailored for paths, I would prefer that.
Otherwise I think
let out = split(myPath, '/')
Should do the trick ?