From 757c1905a289a39f47377ead7fbdb7691af182a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 7 Sep 2016 17:17:49 +0800 Subject: [PATCH] Array Trim & Filter --- array.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/array.js b/array.js index b859fdb..9465039 100644 --- a/array.js +++ b/array.js @@ -80,4 +80,9 @@ module.exports = { return gluedStr.substr( 0, gluedStr.length - 1 ); } + + , arrTrimFilter: function( arr ) + { + return Array.from( arr, x => x.trim() ).filter( x => x ); + } };