Last active
August 29, 2015 14:19
-
-
Save bvdeenen/0cab7b213ddf19ea1217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysPath=require('path'); | |
files=['a','b','c']; | |
parent= "yo"; | |
myjoin = function(a,b){return sysPath.join(a,b);} | |
console.log(files.map( myjoin.bind(null, parent) )); // works fine | |
console.log(files.map( sysPath.join.bind(null, parent) )); // throws exception | |
// [ 'yo/a', 'yo/b', 'yo/c' ] | |
// path.js:488 | |
// throw new TypeError('Arguments to path.join must be strings'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment