+4
-1
@@ -22,3 +22,6 @@ (function(root, factory) { | ||
| function reEscape(s) { | ||
| return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') | ||
| return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, function(x) { | ||
| if (x === '-') return '\\x2d' | ||
| return '\\' + x | ||
| }) | ||
| } | ||
@@ -25,0 +28,0 @@ function reGroups(s) { |
+1
-1
| { | ||
| "name": "moo", | ||
| "version": "0.5.2", | ||
| "version": "0.5.3", | ||
| "description": "Optimised tokenizer/lexer generator! π Much performance. Moo!", | ||
@@ -5,0 +5,0 @@ "main": "moo.js", |
+3
-1
@@ -25,4 +25,6 @@  | ||
| Moo is the fastest JS tokenizer around. It's **~2β10x** faster than most other tokenizers; it's a **couple orders of magnitude** faster than some of the slower ones. | ||
| Moo is one of the fastest JS tokenizers around. When I benchmarked it in 2017 I concluded: | ||
| > It's **~2β10x** faster than most other tokenizers; it's a **couple orders of magnitude** faster than some of the slower ones. | ||
| Define your tokens **using regular expressions**. Moo will compile 'em down to a **single RegExp for performance**. It uses the new ES6 **sticky flag** where possible to make things faster; otherwise it falls back to an almost-as-efficient workaround. (For more than you ever wanted to know about this, read [adventures in the land of substrings and RegExps](http://mrale.ph/blog/2016/11/23/making-less-dart-faster.html).) | ||
@@ -29,0 +31,0 @@ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
32804
0.38%563
0.54%386
0.52%