aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib')
-rwxr-xr-xjs/lib/NJUtils.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js
index 960c832f..74039e64 100755
--- a/js/lib/NJUtils.js
+++ b/js/lib/NJUtils.js
@@ -211,27 +211,6 @@ exports.NJUtils = Object.create(Object.prototype, {
211 return path.substr(path.lastIndexOf('/') + 1); 211 return path.substr(path.lastIndexOf('/') + 1);
212 } 212 }
213 }, 213 },
214
215 /***
216 * checks for valid uri pattern
217 * also flags if Windows uri pattern and Unix uri patterns are mixed
218 */
219 isValidUri:{
220 value: function(uri){
221 var isWindowsUri=false, isUnixUri=false,status=false;
222 if(uri !== ""){
223 uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces
224
225 //for local machine folder uri
226 isWindowsUri = /^([a-zA-Z]:)(\\[^<>:"/\\|?*]+)*\\?$/gi.test(uri);
227 isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix
228 status = isWindowsUri || isUnixUri;
229 if(isWindowsUri && isUnixUri){status = false;}
230 }
231 return status;
232 }
233 },
234
235 /*** 214 /***
236 * file name validation 215 * file name validation
237 */ 216 */