feature(util) checkExtension -> checkExt

This commit is contained in:
coderaiser 2014-05-14 06:30:25 -04:00
parent 8a4d6bb28f
commit d31a166e52
3 changed files with 27 additions and 31 deletions

View file

@ -162,25 +162,17 @@ var CloudCmd, Util, DOM, CloudFunc, $;
}
function isAudio(name) {
var isMatch,
isStr = Util.isString(name),
exts = '\\.(mp3|ogg)$',
extsReg = new RegExp(exts);
var isMatch;
if (isStr)
isMatch = name.match(extsReg);
isMatch = Util.checkExt(name, ['mp3', 'ogg']);
return isMatch;
}
function isVideo(name) {
var isMatch,
isStr = Util.isString(name),
exts = '\\.(mp4|avi)$',
extsReg = new RegExp(exts);
var isMatch;
if (isStr)
isMatch = name.match(extsReg);
Util.checkExt(name, ['mp4', 'avi']);
return isMatch;
}