email-forward-parser 1.5.8 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils.js +2 -3
- package/package.json +2 -2
package/lib/utils.js
CHANGED
|
@@ -23,8 +23,8 @@ var loopRegexes = function(
|
|
|
23
23
|
regexes, str, mode = "match", highestPosition = true
|
|
24
24
|
) {
|
|
25
25
|
var _match;
|
|
26
|
-
var _maxLength = str.length;
|
|
27
26
|
var _minLength = mode === "split" ? 1 : 0;
|
|
27
|
+
var _maxLength = str.length;
|
|
28
28
|
|
|
29
29
|
for (var _i = 0; _i < regexes.length; _i++) {
|
|
30
30
|
var _regex = regexes[_i];
|
|
@@ -47,7 +47,6 @@ var loopRegexes = function(
|
|
|
47
47
|
}
|
|
48
48
|
} else if (mode === "split" || mode === "match") {
|
|
49
49
|
// A successfull split must return an array with at least two items
|
|
50
|
-
|
|
51
50
|
if ((_currentMatch || []).length > _minLength) {
|
|
52
51
|
if (highestPosition === true) {
|
|
53
52
|
// No previous match?
|
|
@@ -79,7 +78,7 @@ var loopRegexes = function(
|
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
return (_match || []);
|
|
81
|
+
return (mode === "replace") ? (_match || "") : (_match || []);
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "email-forward-parser",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"description": "Parses forwarded emails and extract content",
|
|
5
5
|
"author": "Eliott Vincent <eliott@crisp.chat>",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"nodeunit-x": "0.15.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"re2": "1.20.
|
|
26
|
+
"re2": "1.20.9"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"parser",
|