mongodb-query-parser
Advanced tools
Comparing version
@@ -51,4 +51,5 @@ /** | ||
const subType = v.sub_type; | ||
if (subType === 4) { | ||
return `UUID("${v.buffer.toString('hex')}")`; | ||
if (subType === 4 && v.buffer.length === 16) { | ||
const uuidHex = v.buffer.toString('hex'); | ||
return `UUID("${uuidHex.slice(0, 8)}-${uuidHex.slice(8, 12)}-${uuidHex.slice(12, 16)}-${uuidHex.slice(16, 20)}-${uuidHex.slice(20, 32)}")`; | ||
} | ||
@@ -55,0 +56,0 @@ return `BinData(${subType.toString(16)}, '${v.buffer.toString('base64')}')`; |
{ | ||
"name": "mongodb-query-parser", | ||
"description": "Parse MongoDB queries", | ||
"version": "2.4.10", | ||
"version": "2.4.11", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "check": "mongodb-js-precommit", |
33707
0.5%561
0.18%