mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(util) type: regexp speed up
This commit is contained in:
parent
1150aa7133
commit
8898ca54a8
1 changed files with 1 additions and 1 deletions
|
|
@ -283,7 +283,7 @@
|
|||
* @param variable
|
||||
*/
|
||||
function type(variable) {
|
||||
var regExp = new RegExp('\\s([a-zA-Z]+)'),
|
||||
var regExp = /\s([a-zA-Z]+)/,
|
||||
str = {}.toString.call(variable),
|
||||
typeBig = str.match(regExp)[1],
|
||||
result = typeBig.toLowerCase();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue