node-smart-buffer
Advanced tools
+12
-4
@@ -290,3 +290,14 @@ const maximum = Math.pow( 2, 17 ) - 1; | ||
| storage: {}, | ||
| indexed: {}, | ||
| indexes: {}, | ||
| findNameByIndex: function( index, value ) { | ||
| if ( this.indexes[ index ] == null ) { | ||
| const table = this.indexes[ index ] = {}; | ||
| for ( const name in this.storage ) { | ||
| if ( index in this.storage[ name ] ) { | ||
| table[ this.storage[ name ][ index ] ] = name; | ||
| } | ||
| } | ||
| } | ||
| return this.indexes[ index ][ value ]; | ||
| }, | ||
| }; | ||
@@ -394,5 +405,2 @@ const names = []; | ||
| decode.push( `},` ); | ||
| if ( 'index' in container.storage[ name ] ) { | ||
| container.indexed[ container.storage[ name ].index ] = name; | ||
| } | ||
| } else if ( source[ name ] instanceof Object ) { | ||
@@ -399,0 +407,0 @@ container.encode[ name ] = source[ name ].encode; |
+1
-1
| { | ||
| "name": "node-smart-buffer", | ||
| "version": "2.3.0", | ||
| "version": "3.0.0", | ||
| "description": "ring buffer & packet compile", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
16455
1.34%412
1.98%1
Infinity%