New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details β†’ β†’
Socket
Book a DemoSign in
Socket

moo

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moo - npm Package Compare versions

Comparing version
0.5.2
to
0.5.3
+4
-1
moo.js

@@ -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",

@@ -25,4 +25,6 @@ ![](cow.png)

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 @@