Array Trim & Filter

This commit is contained in:
斟酌 鵬兄 2016-09-07 17:17:49 +08:00
parent 6525d472cd
commit 757c1905a2

View File

@ -80,4 +80,9 @@ module.exports = {
return gluedStr.substr( 0, gluedStr.length - 1 ); return gluedStr.substr( 0, gluedStr.length - 1 );
} }
, arrTrimFilter: function( arr )
{
return Array.from( arr, x => x.trim() ).filter( x => x );
}
}; };