mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(util) checkExt: reduce -> join
This commit is contained in:
parent
1b663e9bdf
commit
97a0389bcd
1 changed files with 1 additions and 13 deletions
14
lib/util.js
14
lib/util.js
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* Licensed under MIT License http://www.opensource.org/licenses/mit-license
|
||||
* Module contain additional system functional
|
||||
*/
|
||||
|
||||
(function(scope) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -106,14 +101,7 @@
|
|||
break;
|
||||
|
||||
case 'array':
|
||||
str = ext.reduce(function(prev, cur) {
|
||||
var ret;
|
||||
|
||||
ret = prev + cur + '|';
|
||||
|
||||
return ret;
|
||||
}, '');
|
||||
|
||||
str = ext.join('|');
|
||||
isMatch = Util.checkExt(name, str);
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue