Files
openpgpjs/test/general
Daniel Huigens d91b064e14 Optimize util.removeTrailingSpaces (#848)
Backtracking regexes have pathological worst-case performance when
a long line contains a large amount of whitespace not followed by
a newline, since the regex engine will attempt to match the regex
at each whitespace character, read ahead to the non-whitespace non-
newline, declare no match, and try again at the next whitespace.

E.g. try running

    util.removeTrailingSpaces(new Array(1e6).join(' ') + 'a').length

which would hang V8.
2019-01-27 00:22:47 +00:00
..
2018-08-14 17:19:55 +02:00
2018-08-14 17:19:55 +02:00
2018-02-13 23:33:09 +01:00
2018-03-01 11:35:16 -08:00
2018-05-29 21:21:24 +02:00