thothJS/path-to — pull request #2 by kaiquewdev (2014-12-25 00:37:56+00:00)
Title: Improvements

1 - The first change was made in the function definition, because of name, this method was more easy to debug.
2 - Added a ternary, to verify if level exists, if not exists the default value was "../", who means in that context go one level up.
3 - Added a verification to archive if not exists just one empty string was defined, to use inside of path.resolve.
4 - The "out" variable was defined to be more expressive and to return the path with resolution, the resolution was important to this module to work with different platforms.