{"name":"@jsonjoy.com/codegen","publishConfig":{"access":"public"},"version":"18.28.0","description":"No-dependencies, low-level, high-performance JIT code generation package for JavaScript","author":{"name":"streamich","url":"https://github.com/streamich"},"homepage":"https://github.com/streamich/json-joy/packages/codegen","repository":{"type":"git","url":"git+https://github.com/streamich/json-joy.git"},"license":"Apache-2.0","funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["jit","codegen","code generation","dynamic","performance","javascript","compiler","function","optimization"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"clean":"rimraf lib typedocs coverage gh-pages yarn-error.log","build":"tsc -b tsconfig.build.json","jest":"node -r ts-node/register ./node_modules/.bin/jest","test":"jest --maxWorkers 7","test:ci":"yarn jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"typedoc","build:pages":"rimraf gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages","typecheck":"tsc -b --noEmit"},"peerDependencies":{"tslib":"2"},"jest":{"preset":"ts-jest","testEnvironment":"node","moduleFileExtensions":["ts","js","tsx"],"transform":{"^.+\\.tsx?$":"ts-jest"},"transformIgnorePatterns":[".*/node_modules/.*"],"testRegex":".*/(__tests__|__jest__|demo)/.*(?<!\\.vi)\\.(test|spec)\\.tsx?$","rootDir":".","testPathIgnorePatterns":["node_modules","\\.vi\\.(test|spec)\\.tsx?$"]},"_id":"@jsonjoy.com/codegen@18.28.0","bugs":{"url":"https://github.com/streamich/json-joy/issues"},"_integrity":"sha512-x88wUPMAXivw/ZHwbruc6XO74iuWuI+GIN0cNl6rj488adKG3MUEBay8ujHHS+s4/Kk/mR4aw/huCVirADTh0g==","_resolved":"/Users/m1book/Developer/streamich/global-monorepo/public/json-joy/packages/codegen/package.tgz","_from":"file:package.tgz","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-x88wUPMAXivw/ZHwbruc6XO74iuWuI+GIN0cNl6rj488adKG3MUEBay8ujHHS+s4/Kk/mR4aw/huCVirADTh0g==","shasum":"3e3dbe053e5c28383cca581220e6fc1833c61ed4","tarball":"http://registry-npm.ywwl.com/@jsonjoy.com/codegen/download/@jsonjoy.com/codegen-18.28.0.tgz","fileCount":31,"unpackedSize":153816,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFwNx9HKdB4buWIb6ngzUbxCLZGatHnM/g+syrCK6l8qAiAtV+0jELOaspfAKoDZx+vAbyf9rMFeEwAXMsmF4Mh7WQ=="}],"size":42967,"noattachment":false,"key":"/@jsonjoy.com/codegen/-/@jsonjoy.com/codegen-18.28.0.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"maintainers":[{"name":"json-joy-team","email":"team@jsonjoy.com"},{"name":"streamich","email":"vadimsdaleckis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/codegen_18.28.0_1780421914122_0.5790761876984187"},"_hasShrinkwrap":false,"readme":"# @jsonjoy.com/codegen\n\nA no-dependencies, low-level, high-performance JIT code generation package for\nJavaScript. This package contains utilities for generating optimized JavaScript\ncode at runtime. It enables creating high-performance functions by generating\ncode dynamically based on schemas, templates, or runtime data.\n\n## Features\n\n- **Zero dependencies** - Lightweight and fast to install\n- **High performance** - Generates optimized JavaScript functions at runtime\n- **Type safe** - Full TypeScript support with comprehensive type definitions\n- **Flexible** - Supports various code generation patterns and techniques\n- **Production ready** - Battle-tested and optimized for real-world usage\n\n## Use Cases\n\nJIT (Just-In-Time) code generation can provide significant performance improvements\nwhen you have advance knowledge of the data structure or execution pattern.\n\nSome examples:\n\n- **Deep equality comparison function**: When one object is known in advance, we can\n  generate an optimized function that efficiently compares against a single object.\n  This technique is implemented in the `json-equal` library.\n\n- **JSON Patch execution**: When the JSON Patch operations are known beforehand, we can\n  generate an optimized function that applies the patch in the most efficient way.\n  This approach is used in the `json-patch` library.\n\n- **Schema-based validation**: Given a `json-type` schema of a JSON object, it's possible\n  to generate highly optimized functions for validation and serialization that avoid\n  generic overhead and execute significantly faster than traditional approaches.\n\nOther:\n\n- Optimized validation and serialization functions\n- Custom function generation based on runtime data\n- Performance-critical code that benefits from JIT compilation\n\n\n## Installation\n\n```bash\nnpm install @jsonjoy.com/codegen\n```\n\n## Quick Start\n\n```typescript\nimport { Codegen } from '@jsonjoy.com/codegen';\n\nconst codegen = new Codegen();\n// Add your code generation logic here\nconst optimizedFunction = codegen.compile();\n```\n\n## License\n\nApache-2.0\n","publish_time":1780421914294,"_cnpm_publish_time":1780421914294,"dist-tags":{"latest":"18.30.0"}}