{"library":"with","type":"library","category":null,"description":"The `with` package provides a utility to transform JavaScript code, effectively simulating the behavior of the deprecated `with` statement at compile time. This allows developers to safely use `with`-like scoping in strict mode environments and ensures compatibility with minification tools, which typically struggle with native `with`. Currently at version 7.0.2, the package maintains an active release cadence with minor bug fixes and performance improvements following major version updates. Key differentiators include its strict mode compatibility, predictable variable assignment within the generated scope (unlike native `with` which can leak assignments), and the explicit declaration of all non-excluded variables, enabling `if (foo === undefined)` checks. It also offers detailed parsing errors for easier debugging.","language":"javascript","status":"active","version":"7.0.2","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install with","imports":["import addWith from 'with';","var addWith = require('with');","import addWith from 'with';\n// `addWith` is a function with the signature:\n// (obj: string, src: string, exclude?: string[]) => string;"]},{"cmd":"yarn add with","imports":[]},{"cmd":"pnpm add with","imports":[]}],"homepage":null,"github":"https://github.com/pugjs/with","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/with","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/with/compatibility"}}