path-helper.js (525B)
1 inlets = 1; 2 outlets = 2; 3 autowatch = 1; 4 5 function name() { 6 n = arguments[0]; 7 outlet(0, n); 8 } 9 10 function path() { 11 loc = arguments[0]; 12 lSplit = loc.split("/"); 13 14 result = ""; 15 for (var i = 0; i < lSplit.length; i++) { 16 if (lSplit[i] === "projects") { 17 result += "/exports/"; 18 break; 19 } 20 else { 21 if (i !== 0) { 22 result += "/"; 23 } 24 result += lSplit[i]; 25 } 26 } 27 28 post(result); 29 30 outlet(1, result); 31 }