smartpath/ts/smartpath.check.ts

10 lines
255 B
TypeScript
Raw Normal View History

2018-07-21 21:26:11 +00:00
import plugins = require('./smartpath.plugins');
2016-04-30 09:02:03 +00:00
2018-07-21 21:26:11 +00:00
export let isDir = function(pathArg: string) {
return !isFile(pathArg);
};
2016-04-30 09:02:03 +00:00
2018-07-21 21:26:11 +00:00
export let isFile = function(pathArg) {
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
};