summaryrefslogtreecommitdiff
path: root/src/words.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/words.js')
-rw-r--r--src/words.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/words.js b/src/words.js
new file mode 100644
index 0000000..02cf864
--- /dev/null
+++ b/src/words.js
@@ -0,0 +1,10 @@
+module.exports = (text, li) => {
+ words = text.split(/[, ]+/);
+ newwords = [];
+ words.forEach((word) => {
+ if (word.trim() != "" && word.length > 3) {
+ newwords.push(word);
+ }
+ })
+ return newwords;
+} \ No newline at end of file