{"_id":"@bkrajendra/nestjs-pdf-lib","_rev":"5-dbf010edbdae1313bdf8a2529e5a61f6","name":"@bkrajendra/nestjs-pdf-lib","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"version":"1.0.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.0","gitHead":"15aad34d3e325ba1acf1ce6861833d8dddf827d2","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-y8fxtIkwdw+jFGpfw4CJe+ShPSSKcXBjNYnfNBS+JOPUU7VZiTEMPgbXx8s3u0qKRNUC6phriMjQslczkWdF8g==","shasum":"c0d21175025af35d29673f5316544c19f173deb5","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.0.tgz","fileCount":13,"unpackedSize":60871,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbFAtt/AJl0YDWPs2UfBDnLLmDYNhH0B6Dgd9UgKPVMAIhAI7smR8ZLEuBnwsVqWVisapMsM66O7Dz26ZQbAHMzPav"}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.0_1703146471703_0.48141805976215024"},"_hasShrinkwrap":false},"1.0.1":{"version":"1.0.1","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","publish":"npm publish --access public"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"fs-extra":"^11.2.0","handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.1","gitHead":"5d482e05a8d59a2905199fc6073607ac82694a69","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-OVdMu4oghf9Z5AqPCQf5TUz7vATlBfLUbj7OSUO7dN9+rCz7gMgkIyhwlfMhDOJgkB6QkvZrMg1OwEzrulsbgg==","shasum":"274ee5f84944ba81b205ff8245d24598083198cb","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.1.tgz","fileCount":13,"unpackedSize":60503,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7QP93IQrRZ0I2aGTFFeVqRkktx1NmXO2i3onbt21flAiEA/dG3RaX+K0le3jscSe5Vyvmlc/N0e/743amuLwEU8/w="}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.1_1703152362452_0.8376227130986298"},"_hasShrinkwrap":false},"1.0.2":{"version":"1.0.2","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","publish":"npm publish --access public"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"fs-extra":"^11.2.0","handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.2","gitHead":"2905963c0afbac823387bacd62ad90079d361174","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-aaJvtEq5wmWV8fhsq66bmQMD53OnfSqLLnPyhHFz31nsM31ggCyinwqctPSJnXfW44LCcGyo39PbjH45JOB9Gg==","shasum":"5a486f70051fbb19e5faa3ba0191bac6613c152c","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.2.tgz","fileCount":13,"unpackedSize":60503,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQD+vJBD+psAtZOOOJAzv8s3MUd4CUN8go6LSqSC77Cf2QIfHWfrp68gZeTgvdRAtVbjZBVf1ubBMIFKCWTswcckbw=="}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.2_1703152501775_0.3128220388161844"},"_hasShrinkwrap":false},"1.0.3":{"version":"1.0.3","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","publish":"npm publish --access public"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"fs-extra":"^11.2.0","handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.3","gitHead":"5b0b7b7f24946bdfd04c10a6f4fb83d2b4233e7c","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-XSGftouES90klIKQACUtpbCLri4H9XASHBicWvd/MsmN5lDsx+2+i4oS6rgPAWIYozp7qTZub3r0LWgsqcU9HQ==","shasum":"b6c20e30269aa3247fcb0a0991f0bca175a8a9a0","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.3.tgz","fileCount":13,"unpackedSize":77797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1xWq5nmlrjtf6VgFr9ajr1Kqj0R/UQPUre3Y8J/nckAiBQoS0gu6K7PURNFd6T79zERUfrMcQkU96c0l89owksjA=="}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.3_1703153224026_0.3101714343029822"},"_hasShrinkwrap":false},"1.0.4":{"version":"1.0.4","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"fs-extra":"^11.2.0","handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.4","gitHead":"2dcd5ee936675c6d76362748ce65cc38972190ad","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-QC4VP6HmbEPX7W0x0q3Jc9GbJYhTnXkYM6MuPrwbJUHKSh7cxasfYX4rwQoSX8EdP7KM54wnlhKOJasdbCRCbg==","shasum":"c23fe782f6e25cf8305df9a0d0bf33a145d8e1bb","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.4.tgz","fileCount":13,"unpackedSize":77751,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb9ZltkrtFpXWlQsLSSsLPv0LFpNuovyQ9KF70Omh0uAIgMRSe4y/5Hi/ozqwj6Skb4UwPtlcfwC52sEkAy8vGsJE="}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.4_1703153352942_0.7726939285770422"},"_hasShrinkwrap":false},"1.0.5":{"version":"1.0.5","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@bkrajendra/nestjs-pdf-lib","author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","module":"dist/nestjs-pdf-lib.esm.js","size-limit":[{"path":"dist/nestjs-pdf-lib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/nestjs-pdf-lib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^11.0.1","husky":"^8.0.3","jest":"^29.7.0","size-limit":"^11.0.1","tsdx":"^0.14.1","tslib":"^2.6.2","typescript":"^5.3.3"},"dependencies":{"fs-extra":"^11.2.0","handlebars":"^4.7.8","puppeteer":"^21.6.1"},"_id":"@bkrajendra/nestjs-pdf-lib@1.0.5","gitHead":"a78c23cb753c0974474ae707ab14e65660c543ca","_nodeVersion":"20.10.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-LEJQV3LDA2xnLvoCJ5pRjM7N78PTRbYLRJ0hW3s4IIWNAInHxSLV2pNahPcsZPVc6v1eObfZdaPZdtemgk+4Rg==","shasum":"8c9d9f5fd356bcd0bb0bfb19a284c41727fff14b","tarball":"https://registry.npmjs.org/@bkrajendra/nestjs-pdf-lib/-/nestjs-pdf-lib-1.0.5.tgz","fileCount":13,"unpackedSize":77998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGh1HsmxYHnzfJTTsRJW2fHZOYyNszV9u6VNRe6PuFlaAiEA19X6MUb9cy4p5EX18tWunEgwh5XI/msQiuLG70qIFHM="}]},"_npmUser":{"name":"bkrajendra","email":"bkrajendra@gmail.com"},"directories":{},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-pdf-lib_1.0.5_1703154588973_0.40705604325108835"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-21T08:14:31.597Z","1.0.0":"2023-12-21T08:14:31.912Z","modified":"2023-12-21T10:29:49.281Z","1.0.1":"2023-12-21T09:52:42.675Z","1.0.2":"2023-12-21T09:55:02.069Z","1.0.3":"2023-12-21T10:07:04.232Z","1.0.4":"2023-12-21T10:09:13.127Z","1.0.5":"2023-12-21T10:29:49.137Z"},"maintainers":[{"name":"bkrajendra","email":"bkrajendra@gmail.com"}],"description":"NestJS PDF Library to generate PDF with the help of handlebar template using HTML.","homepage":"https://github.com/bkrajendra/nestjs-pdf-lib#readme","repository":{"type":"git","url":"git+https://github.com/bkrajendra/nestjs-pdf-lib.git"},"author":{"name":"Rajendra Khope","email":"bkrajendra@gmail.com"},"bugs":{"url":"https://github.com/bkrajendra/nestjs-pdf-lib/issues"},"license":"MIT","readme":"# NestJS PDF Library\n\nNestJS PDF Library to generate PDF with the help of handlebar template using HTML.\n\n> There are multiple libraries out there, but it lacks the support for running inside docker container. This is an effort to make this library to be able to run the containers.\n\n## Installation\n\n`npm i @bkrajendra/nestjs-pdf-lib`\n\n## How to use?\n\nInitialization\n\n```typescript\n// pdf.service.ts\nimport { Injectable } from '@nestjs/common';\nimport { createPdf } from '@bkrajendra/nestjs-pdf-lib';\nimport * as path from 'path';\n\n@Injectable()\nexport class PdfService {\n  constructor(private admService: NurseryAdmissionService) {}\n  generatePDF(id: number) {\n    const data = {\n      title: 'Handlebars Example',\n      items: ['Item 1', 'Item 2', 'Item 3'],\n      showFooter: true,\n    };\n\n    const options = {\n      format: 'A4',\n      displayHeaderFooter: true,\n      margin: {\n        left: '10mm',\n        top: '25mm',\n        right: '10mm',\n        bottom: '15mm',\n      },\n      footerTemplate:\n        '<div style=\"width: 100%; text-align: center; font-size: 10px;\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>',\n      landscape: false,\n    };\n    const filePath = path.join(\n      process.cwd(),\n      'src/domain/pdf/templates',\n      'admission.hbs'\n    );\n    return createPdf(filePath, options, data);\n  }\n}\n```\n\nHandlebar Template:\n\n```html\n<!-- templates/mypdf.hdb -->\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Handlebars Example</title>\n  </head>\n  <body>\n    <h1>{{title}}</h1>\n\n    <ul>\n      {{#each items}}\n      <li>{{this}}</li>\n      {{/each}}\n    </ul>\n\n    <p>{{#if showFooter}}This is the footer.{{/if}}</p>\n  </body>\n</html>\n```\n\nController\n\n```typescript\n// pdf.controller.ts\nimport { Controller, Get, Param, Res } from '@nestjs/common';\nimport { PdfService } from './pdf.service';\n\n@Controller('pdf')\nexport class PdfController {\n  constructor(\n    private pedService: PdfService,\n  ) {}\n  @Get(':id')\n  async generatePdf2(@Res() res, @Param('id') id: number) {\n    const buffer = await this.pedService.generatePDF(id);\n\n    res.set({\n      'Content-Type': 'application/pdf',\n      'Content-Disposition': `attachment; filename=${id}.pdf`,\n      'Content-Length': buffer.length,\n      'Cache-Control': 'no-cache, no-store, must-revalidate',\n      Pragma: 'no-cache',\n      Expires: 0,\n    });\n    res.end(buffer);\n  }\n}\n\n```\n\n## Commands\n\nTo run build the library, use:\n\n```bash\nnpm run buid # or yarn start\n```\n\nThis builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.\n\nTo do a one-off build, use `npm run build` or `yarn build`.\n\nTo run tests, use `npm test` or `yarn test`.\n\n## Configuration\n\nCode quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.\n\n### Jest\n\nJest tests are set up to run with `npm test` or `yarn test`.\n\n### Bundle Analysis\n\n[`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`.\n\n#### Setup Files\n\nThis is the folder structure we set up for you:\n\n```txt\n/src\n  index.tsx       # EDIT THIS\n/test\n  blah.test.tsx   # EDIT THIS\n.gitignore\npackage.json\nREADME.md         # EDIT THIS\ntsconfig.json\n```\n\n### Rollup\n\nTSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.\n\n### TypeScript\n\n`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.\n\n## Continuous Integration\n\n### GitHub Actions\n\nTwo actions are added by default:\n\n- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix\n- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)\n\n## Optimizations\n\nPlease see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:\n\n```js\n// ./types/index.d.ts\ndeclare var __DEV__: boolean;\n\n// inside your code...\nif (__DEV__) {\n  console.log('foo');\n}\n```\n\nYou can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.\n\n## Module Formats\n\nCJS, ESModules, and UMD module formats are supported.\n\nThe appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.\n","readmeFilename":"README.md"}