@jsonjoy.com/codegen
Advanced tools
+1
-1
@@ -6,3 +6,3 @@ { | ||
| }, | ||
| "version": "18.7.0", | ||
| "version": "18.8.0", | ||
| "description": "No-dependencies, low-level, high-performance JIT code generation package for JavaScript", | ||
@@ -9,0 +9,0 @@ "author": { |
+25
-4
| # @jsonjoy.com/codegen | ||
| A no-dependencies, low-level, high-performance JIT code generation package for JavaScript. | ||
| A no-dependencies, low-level, high-performance JIT code generation package for | ||
| JavaScript. This package contains utilities for generating optimized JavaScript | ||
| code at runtime. It enables creating high-performance functions by generating | ||
| code dynamically based on schemas, templates, or runtime data. | ||
@@ -15,4 +18,21 @@ ## Features | ||
| - Deep equality comparison functions with known schemas | ||
| - JSON Patch execution with pre-known patches | ||
| JIT (Just-In-Time) code generation can provide significant performance improvements | ||
| when you have advance knowledge of the data structure or execution pattern. | ||
| Some examples: | ||
| - **Deep equality comparison function**: When one object is known in advance, we can | ||
| generate an optimized function that efficiently compares against a single object. | ||
| This technique is implemented in the `json-equal` library. | ||
| - **JSON Patch execution**: When the JSON Patch operations are known beforehand, we can | ||
| generate an optimized function that applies the patch in the most efficient way. | ||
| This approach is used in the `json-patch` library. | ||
| - **Schema-based validation**: Given a `json-type` schema of a JSON object, it's possible | ||
| to generate highly optimized functions for validation and serialization that avoid | ||
| generic overhead and execute significantly faster than traditional approaches. | ||
| Other: | ||
| - Optimized validation and serialization functions | ||
@@ -22,2 +42,3 @@ - Custom function generation based on runtime data | ||
| ## Installation | ||
@@ -41,2 +62,2 @@ | ||
| Apache-2.0 | ||
| Apache-2.0 |
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
150052
0.68%61
56.41%