From 701af40144b2d1822ece2b8c1d2402127a965506 Mon Sep 17 00:00:00 2001 From: luluhan Date: Sun, 7 Apr 2019 00:05:38 +0800 Subject: [PATCH] update --- lib/meta.js | 2 ++ lib/quantifier.js | 2 ++ lib/split.js | 3 +++ 3 files changed, 7 insertions(+) diff --git a/lib/meta.js b/lib/meta.js index a08ee57..84ed723 100644 --- a/lib/meta.js +++ b/lib/meta.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + const regExp = /\.$/; + return regExp.test(str); } \ No newline at end of file diff --git a/lib/quantifier.js b/lib/quantifier.js index a08ee57..30cb11c 100644 --- a/lib/quantifier.js +++ b/lib/quantifier.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + const regExp = /^[0-9]+\.(jpg|jpeg)$/; + return regExp.test(str); } \ No newline at end of file diff --git a/lib/split.js b/lib/split.js index a08ee57..c65a131 100644 --- a/lib/split.js +++ b/lib/split.js @@ -1,3 +1,6 @@ module.exports = function (str) { // TODO + const regExp = /(\n|\r|\s)/g; + str = str.replace(regExp, ''); + return str.split(','); } \ No newline at end of file