Skip to content

Instantly share code, notes, and snippets.

@itayw
Created November 13, 2013 10:22
Show Gist options
  • Save itayw/7446807 to your computer and use it in GitHub Desktop.
Save itayw/7446807 to your computer and use it in GitHub Desktop.
Check relative paths
var path = require('path');
var x = 'c:\\';
var y = 'C:\\joola.io\\joola.io.config\\config'
console.log(x, y);
console.log(path.resolve(x));
if (path.resolve(x) == path.join(__dirname, x))
console.log('match');
else
console.log('no match');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment