added check module

This commit is contained in:
LosslessBot
2016-04-30 11:02:03 +02:00
parent a8f93682fc
commit 2866a76abc
7 changed files with 92 additions and 12 deletions

9
ts/smartpath.check.ts Normal file
View File

@@ -0,0 +1,9 @@
import plugins = require("./smartpath.plugins");
export let isDir = function(pathArg:string){
return !isFile(pathArg);
}
export let isFile = function(pathArg){
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
}