smartpath/ts/smartpath.check.ts

10 lines
259 B
TypeScript
Raw Normal View History

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