From b4862e347d9adea9e6e567771c308ddaeb242065 Mon Sep 17 00:00:00 2001 From: zhangxuemei Date: Sat, 24 Nov 2018 16:47:01 +0800 Subject: [PATCH] pass --- .gitignore | 4 +++- lib/meta.js | 2 ++ lib/quantifier.js | 1 + lib/split.js | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b512c09..420f7de 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +yarn-error.log* +yarn.lock* \ No newline at end of file diff --git a/lib/meta.js b/lib/meta.js index a08ee57..410448b 100644 --- a/lib/meta.js +++ b/lib/meta.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + const reg = /\.$/; + return reg.test(str); } \ No newline at end of file diff --git a/lib/quantifier.js b/lib/quantifier.js index a08ee57..b41efac 100644 --- a/lib/quantifier.js +++ b/lib/quantifier.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return /^\d+(\.jpe?g)$/.test(str); } \ No newline at end of file diff --git a/lib/split.js b/lib/split.js index a08ee57..92f472c 100644 --- a/lib/split.js +++ b/lib/split.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return str.split(/\s*,\s*/); } \ No newline at end of file