smartpath/dist/smartpath.check.js

10 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

2016-04-30 09:02:03 +00:00
"use strict";
exports.isDir = function (pathArg) {
return !exports.isFile(pathArg);
};
exports.isFile = function (pathArg) {
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
};
2016-04-30 10:07:49 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRVcsYUFBSyxHQUFHLFVBQVMsT0FBYztJQUN0QyxNQUFNLENBQUMsQ0FBQyxjQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDNUIsQ0FBQyxDQUFBO0FBRVUsY0FBTSxHQUFHLFVBQVMsT0FBTztJQUNoQyxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLDRDQUE0QztBQUNyRixDQUFDLENBQUEiLCJmaWxlIjoic21hcnRwYXRoLmNoZWNrLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9zbWFydHBhdGgucGx1Z2luc1wiKTtcblxuZXhwb3J0IGxldCBpc0RpciA9IGZ1bmN0aW9uKHBhdGhBcmc6c3RyaW5nKXtcbiAgICByZXR1cm4gIWlzRmlsZShwYXRoQXJnKTtcbn1cblxuZXhwb3J0IGxldCBpc0ZpbGUgPSBmdW5jdGlvbihwYXRoQXJnKXtcbiAgICByZXR1cm4gL1xcLlthLXpBLVpdKiQvLnRlc3QocGF0aEFyZyk7IC8vIGNoZWNrcyBpZiB0aGVyZSBpcyBhIC5hbnl0aGluZyBhdCB0aGUgZW5kXG59Il19