smartpath/ts/smartpath.check.ts

11 lines
276 B
TypeScript
Raw Normal View History

2016-09-30 15:08:09 +00:00
import 'typings-global'
import plugins = require('./smartpath.plugins')
2016-04-30 09:02:03 +00:00
2017-02-19 02:29:54 +00:00
export let isDir = function (pathArg: string) {
return !isFile(pathArg)
2016-04-30 09:02:03 +00:00
}
2017-02-19 02:29:54 +00:00
export let isFile = function (pathArg) {
return /\.[a-zA-Z]*$/.test(pathArg) // checks if there is a .anything at the end
2016-09-30 15:08:09 +00:00
}