{"name":"putout","version":"40.0.22","keywords":["ast","transform","putout-script","codemod","eslint","babel","plugin","lint","variable","unused"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"putout@40.0.22","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"bin":{"putout":"bin/tracer.mjs"},"dist":{"shasum":"82cfe278e64cff7d8d34d23c2c8836ea38cb953c","tarball":"http://registry-npm.ywwl.com/putout/download/putout-40.0.22.tgz","fileCount":48,"integrity":"sha512-6jKiJsmhfHiWtVaZR+kJkJSxqz0TI78hyIJMpO9fEstVtChDuIPDjNOdbaZpp0a+FS2QiSW15J2TNhhy9ZID7A==","signatures":[{"sig":"MEUCIQDRAmzcFIab4dsoziMnrmLmF6oOUiQUs72yq1WA2YpBwgIgNkjuzzJ1Ae65H5JuIEXdz2SNVkbfCkr7UM/KZU5Yr2U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":568616,"size":125664,"noattachment":false,"key":"/putout/-/putout-40.0.22.tgz"},"main":"./lib/putout.js","type":"commonjs","engines":{"node":">=20"},"exports":{".":{"import":"./lib/putout.mjs","require":"./lib/putout.js"},"./cli":"./lib/cli/index.js","./ignores":"./lib/ignores.js","./register":"./lib/loader/register.mjs","./lint/json":"./lib/lint/json.mjs","./transform":"./lib/transform.js","./exit-codes":"./lib/cli/exit-codes.mjs","./find-places":"./lib/find-places.js","./parse-error":"./lib/parse-error.js","./parse-match":"./lib/parse-options/parse-match.js","./putout.json":"./putout.json","./package.json":"./package.json","./merge-options":"./lib/parse-options/merge-options.js","./parse-options":"./lib/parse-options/index.js","./simple-import":"./lib/cli/simple-import.js","./exit-codes/cjs":"./lib/cli/exit-codes.js","./cli/get-options":"./lib/cli/get-options.js"},"gitHead":"79a2076d58eaa0a70aa83e54fb646e7d990f0b66","scripts":{"lint":"madrun lint","test":"madrun test","trace":"madrun trace","report":"madrun report","wisdom":"madrun wisdom","coverage":"madrun coverage","fix:lint":"madrun fix:lint","test:raw":"madrun test:raw","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test","lint:progress":"madrun lint:progress","fix:lint:fresh":"madrun fix:lint:fresh"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json","directories":{},"_nodeVersion":"23.11.0","dependencies":{"ajv":"^8.8.2","once":"^1.4.0","chalk":"^5.3.0","debug":"^4.1.1","ignore":"^7.0.0","ci-info":"^4.0.0","find-up":"^7.0.0","escalade":"^3.1.1","wraptile":"^3.0.0","deepmerge":"^4.0.0","fast-glob":"^3.2.2","fullstore":"^3.0.0","picomatch":"^4.0.2","try-catch":"^3.0.0","is-relative":"^1.0.0","nano-memoize":"^3.0.11","try-to-catch":"^3.0.0","yargs-parser":"^21.0.0","@putout/babel":"^3.0.0","@putout/compare":"^17.0.0","@putout/operate":"^13.0.0","@putout/traverse":"^13.0.0","@putout/cli-cache":"^5.0.0","@putout/cli-match":"^2.0.0","@putout/cli-ruler":"^4.0.0","@putout/cli-staged":"^1.0.0","@putout/plugin-esm":"^4.0.0","@putout/plugin-new":"^4.0.0","@putout/plugin-math":"^4.0.0","@putout/plugin-tape":"^19.0.0","@putout/cli-keypress":"^3.0.0","@putout/plugin-maybe":"^4.0.0","@putout/plugin-types":"^8.0.0","@putout/engine-loader":"^15.0.0","@putout/engine-parser":"^13.0.0","@putout/engine-runner":"^24.0.0","@putout/operator-json":"^2.0.0","@putout/plugin-eslint":"^14.0.0","@putout/plugin-for-of":"^9.0.0","@putout/plugin-github":"^15.0.0","@putout/plugin-labels":"^2.0.0","@putout/plugin-madrun":"^21.0.0","@putout/plugin-montag":"^4.0.0","@putout/plugin-nodejs":"^16.0.0","@putout/plugin-parens":"^3.0.0","@putout/plugin-putout":"^25.0.0","@putout/plugin-regexp":"^11.0.0","@putout/plugin-return":"^2.0.0","@putout/processor-css":"^11.0.0","@putout/formatter-dump":"^5.0.0","@putout/formatter-json":"^2.0.0","@putout/formatter-time":"^3.0.0","@putout/plugin-declare":"^5.0.0","@putout/plugin-webpack":"^4.0.0","@putout/processor-json":"^9.0.0","@putout/processor-yaml":"^8.0.0","@putout/engine-reporter":"^4.0.0","@putout/formatter-frame":"^7.0.0","@putout/operator-ignore":"^2.0.0","@putout/operator-parens":"^1.0.0","@putout/operator-regexp":"^1.0.0","@putout/plugin-apply-at":"^2.0.0","@putout/plugin-coverage":"^1.0.0","@putout/plugin-promises":"^17.0.0","@putout/cli-process-file":"^3.0.0","@putout/engine-processor":"^13.0.0","@putout/formatter-memory":"^4.0.0","@putout/formatter-stream":"^5.0.0","@putout/operator-declare":"^12.0.0","@putout/operator-keyword":"^2.0.0","@putout/plugin-gitignore":"^6.0.0","@putout/plugin-npmignore":"^5.0.0","@putout/plugin-try-catch":"^6.0.0","@putout/processor-ignore":"^6.0.0","@putout/cli-validate-args":"^2.0.0","@putout/operator-add-args":"^11.0.1","@putout/plugin-assignment":"^1.0.2","@putout/plugin-conditions":"^7.1.0","@putout/plugin-filesystem":"^10.0.0","@putout/plugin-generators":"^1.0.0","@putout/plugin-typescript":"^12.0.0","@putout/formatter-progress":"^5.0.0","@putout/plugin-apply-arrow":"^2.0.0","@putout/plugin-browserlist":"^2.0.0","@putout/plugin-remove-iife":"^4.0.0","@putout/processor-markdown":"^12.0.0","@putout/formatter-codeframe":"^8.0.0","@putout/operator-filesystem":"^8.0.0","@putout/plugin-package-json":"^9.0.0","@putout/plugin-remove-empty":"^14.0.0","@putout/cli-choose-formatter":"^4.0.0","@putout/formatter-json-lines":"^3.0.0","@putout/operator-match-files":"^8.0.0","@putout/plugin-putout-config":"^10.0.0","@putout/processor-filesystem":"^6.0.0","@putout/processor-javascript":"^5.0.0","@putout/operator-rename-files":"^4.0.0","@putout/plugin-apply-flat-map":"^3.0.0","@putout/plugin-remove-console":"^6.0.0","@putout/formatter-progress-bar":"^4.0.0","@putout/plugin-apply-overrides":"^3.0.0","@putout/plugin-remove-debugger":"^7.0.0","@putout/plugin-simplify-ternary":"^8.0.0","@putout/plugin-apply-starts-with":"^1.0.0","@putout/plugin-optional-chaining":"^2.0.0","@putout/plugin-apply-dot-notation":"^2.0.0","@putout/plugin-remove-useless-map":"^1.0.0","@putout/plugin-apply-destructuring":"^9.0.0","@putout/plugin-logical-expressions":"^7.0.0","@putout/plugin-remove-useless-push":"^1.0.0","@putout/plugin-convert-const-to-let":"^4.0.0","@putout/plugin-remove-nested-blocks":"^8.0.0","@putout/plugin-remove-unused-labels":"^1.0.1","@putout/plugin-remove-useless-array":"^1.0.0","@putout/plugin-reuse-duplicate-init":"^8.0.0","@putout/plugin-remove-duplicate-case":"^3.0.0","@putout/plugin-remove-duplicate-keys":"^7.0.0","@putout/plugin-remove-useless-assign":"^1.0.0","@putout/plugin-remove-useless-delete":"^1.0.1","@putout/plugin-remove-useless-escape":"^7.0.0","@putout/plugin-remove-useless-spread":"^12.0.0","@putout/plugin-convert-concat-to-flat":"^1.0.0","@putout/plugin-remove-useless-operand":"^2.0.0","@putout/plugin-remove-useless-replace":"^1.0.1","@putout/plugin-apply-template-literals":"^4.0.0","@putout/plugin-convert-apply-to-spread":"^4.0.0","@putout/plugin-remove-unreachable-code":"^2.0.0","@putout/plugin-remove-unused-variables":"^12.0.0","@putout/plugin-remove-useless-continue":"^2.0.0","@putout/plugin-declare-before-reference":"^8.0.0","@putout/plugin-remove-useless-arguments":"^11.0.0","@putout/plugin-remove-useless-functions":"^4.0.0","@putout/plugin-remove-useless-variables":"^14.0.0","@putout/plugin-convert-arguments-to-rest":"^3.0.0","@putout/plugin-convert-to-arrow-function":"^4.0.0","@putout/plugin-extract-object-properties":"^9.0.0","@putout/plugin-merge-duplicate-functions":"^3.0.0","@putout/plugin-remove-unused-expressions":"^11.0.0","@putout/plugin-apply-shorthand-properties":"^6.0.0","@putout/plugin-convert-template-to-string":"^2.0.0","@putout/plugin-remove-constant-conditions":"^4.0.0","@putout/plugin-remove-useless-constructor":"^2.0.0","@putout/plugin-split-nested-destructuring":"^4.0.0","@putout/plugin-convert-array-copy-to-slice":"^3.0.0","@putout/plugin-convert-quotes-to-backticks":"^5.0.0","@putout/plugin-split-variable-declarations":"^5.0.0","@putout/plugin-convert-expression-to-params":"^1.0.0","@putout/plugin-convert-index-of-to-includes":"^2.0.0","@putout/plugin-extract-sequence-expressions":"^3.0.0","@putout/plugin-remove-unused-private-fields":"^3.0.0","@putout/plugin-remove-useless-array-entries":"^1.0.0","@putout/plugin-remove-unreferenced-variables":"^5.0.0","@putout/plugin-split-call-with-destructuring":"^2.0.0","@putout/plugin-merge-destructuring-properties":"^11.0.0","@putout/plugin-remove-unused-for-of-variables":"^3.0.0","@putout/plugin-extract-keywords-from-variables":"^2.0.0","@putout/plugin-remove-useless-array-constructor":"^2.0.0","@putout/plugin-remove-useless-template-expressions":"^2.0.0","@putout/plugin-convert-object-assign-to-merge-spread":"^6.0.0","@putout/plugin-convert-object-entries-to-array-entries":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","montag":"^1.2.1","currify":"^4.0.0","nodemon":"^3.0.1","supertape":"^11.0.3","strip-ansi":"^7.0.0","mock-require":"^3.0.2","eslint-plugin-n":"^17.0.0","just-camel-case":"^6.2.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^26.0.0","@putout/plugin-apply-entries":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/putout_40.0.22_1746392905498_0.7976716192374609","host":"s3://npm-registry-packages-npm-production"},"readme":"# Putout [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/putout.svg?style=flat&longCache=true\n[BuildStatusIMGURL]: https://github.com/coderaiser/putout/workflows/Node%20CI/badge.svg\n[NPMURL]: https://npmjs.org/package/putout \"npm\"\n[BuildStatusURL]: https://github.com/coderaiser/putout/actions?query=workflow%3A%22Node+CI%22 \"Build Status\"\n[CoverageURL]: https://coveralls.io/github/coderaiser/putout?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/putout/badge.svg?branch=master&service=github\n\n> **Perfection is finally attained not when there is no longer anything to add,\n> but when there is no longer anything to take away.**\n>\n> **(c) Antoine de Saint Exupéry**\n\n![putout](https://github.com/coderaiser/putout/blob/master/images/putout-logo.svg)\n\n🐊**Putout** is a JavaScript Linter, pluggable and configurable code transformer, drop-in **ESLint** replacement with built-in [code printer](https://github.com/putoutjs/printer#readme) and ability to [fix syntax errors](https://github.com/coderaiser/putout/blob/master/docs/syntax-errors#%EF%B8%8F-syntax-errors). It has [a lot of transformations](https://github.com/coderaiser/putout#-built-in-transformations) that keeps your codebase in a clean state, removing any code smell and making code readable according to best practices.\n\nThe main target is **JavaScript**, but:\n\n- ✅ JSX;\n- ✅ TypeScript;\n- ✅ Yaml;\n- ✅ Markdown;\n- ✅ JSON;\n- ✅ Ignore;\n\nare also supported. Here is how it looks like:\n\n[![putout](https://asciinema.org/a/0akg9gkJdbmbGl6BbpaycgKZm.svg)](https://asciinema.org/a/0akg9gkJdbmbGl6BbpaycgKZm)\n\n## 🤷‍️ In doubt about using 🐊Putout?\n\nCheck out couple variants of plugins that does the same: [**linting debugger statement**](https://putout.cloudcmd.io/#/gist/f61ba31fe534868d49eba9b946f3ed4b/5ef6863d9cf4826666782ae0eea5cb5def266bbd):\n\n- ❌ SWCLint [no-debugger](https://github.com/swc-project/swc/blob/v1.2.138/crates/swc_ecma_lints/src/rules/no_debugger.rs): **49** lines;\n- ❌ RSLint [no-debugger](https://github.com/rslint/rslint/blob/v0.3.0/crates/rslint_core/src/groups/errors/no_debugger.rs): **48** lines;\n- ❌ ESLint [no-debugger](https://github.com/eslint/eslint/blob/2dc38aa653f1d5137a9abf82024c67a11620bb7c/lib/rules/no-debugger.js): **43** lines;\n- ❌ Rome [no-debugger](https://github.com/rome/tools/blob/4d5a99ce98e987cbd03f3ab6b38fa22d00bbfe27/packages/%40romejs/js-compiler/transforms/lint/noDebugger.ts): **28** lines;\n- ✅ 🐊**Putout** [remove-debugger](https://github.com/coderaiser/putout/blob/v42.7.1/packages/plugin-remove-debugger/lib/remove-debugger.js): **4** lines:\n\n```js\nexport const report = () => `Avoid 'debugger' statement`;\n\nexport const replace = () => ({\n    debugger: '',\n});\n```\n\n*Choose wisely, competitors cannot even fix…* 🤫\n\n## 🙏 Whom should I thank for this project exist?\n\n> **If I have seen further, it is by standing upon the shoulders of giants.**\n>\n> **(c) Isaak Newton**\n\n- 💪 [**ESLint**](https://eslint.org) for stable releases and future proof `API`.\n- 💪 [**Babel**](https://babeljs.io) for amazing `API` documented in [`Handbook`](https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-plugin-handbook) and responsiveness of a team.\n- 💪 [**Prettier**](https://github.com/prettier/prettier) for minimalistic options and uniform codestyle.\n- 💪 [**jscodeshift**](https://github.com/facebook/jscodeshift) for making codemods simple and popular.\n\n## 🤷 Why does this project exist?\n\n- ❌ [**ESLint**](https://eslint.org) avoids [fixes that could change the runtime behavior](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes).\n- ❌ [**Babel**](https://babeljs.io) produces [throw-away code](https://github.com/babel/babel/issues/5139).\n- ❌ [**Prettier**](https://github.com/prettier/prettier) is a formatter.\n- ❌ [**jscodeshift**](https://github.com/facebook/jscodeshift) has no `config` and `plugins` support.\n\n☝️ *🐊**Putout** on the other hand can make more drastic code transformations that directly affects your codebase making it a better place to code 💻.*\n\n[It can](https://github.com/coderaiser/putout#-built-in-transformations):\n\n- ✅ remove unused `variables`;\n- ✅ remove unused `for-of variables`;\n- ✅ remove unused `typescripts` types;\n- ✅ remove unreferenced `variables`;\n- ✅ remove unused `private fields`;\n- ✅ remove unused `expressions`;\n- ✅ remove useless `variables`;\n- ✅ remove useless `Object.assign()`;\n- ✅ remove useless `replace()`;\n- ✅ remove useless `map`;\n- ✅ remove useless `mapped types`;\n- ✅ remove useless `mapping modifiers`;\n- ✅ remove useless `continue`;\n- ✅ remove useless `operand`;\n- ✅ remove useless `array constructor`;\n- ✅ remove useless `conditions`;\n- ✅ remove useless `type conversion`;\n- ✅ remove useless `functions`;\n- ✅ remove useless `Array.from`;\n- ✅ remove useless `spread`;\n- ✅ remove useless `arguments`;\n- ✅ remove useless `escape`;\n- ✅ remove useless `async`;\n- ✅ remove useless `await`;\n- ✅ remove useless `typeof`;\n- ✅ remove useless `template expressions`;\n- ✅ remove useless `for-of`;\n- ✅ remove useless `array.entries()`;\n- ✅ remove `debugger` statement;\n- ✅ remove `iife`;\n- ✅ remove nested blocks;\n- ✅ remove `process.exit` call;\n- ✅ remove `console.log` calls;\n- ✅ remove `empty block statements`;\n- ✅ remove `empty patterns`;\n- ✅ remove `strict mode` directive from `esm`;\n- ✅ remove `constant conditions`;\n- ✅ remove `boolean` from `assertion`;\n- ✅ remove `boolean` from `logical expressions`;\n- ✅ remove `duplicates` from TypeScript `Union`;\n- ✅ remove `unreachable code`;\n- ✅ remove `duplicate keys`;\n- ✅ remove useless `typescripts` types;\n- ✅ remove duplicate `typescripts` interface keys;\n- ✅ replace `test.only` to `test` calls;\n- ✅ replace `test.skip` to `test` calls;\n- ✅ reuse duplicate `init`;\n- ✅ split `variable declarations`;\n- ✅ split `nested destructuring`;\n- ✅ simplify `assignment`;\n- ✅ simplify `ternary`;\n- ✅ simplify `logical expressions`;\n- ✅ if absent `strict mode` directive in `commonjs` add it;\n- ✅ convert `const` to `let` (when needed to avoid `TypeError`);\n- ✅ convert `apply` to `spread`;\n- ✅ convert `bitwise` to `logical` operator;\n- ✅ convert `concat` to `flat`;\n- ✅ convert `esm` to `commonjs` (enabled for `*.cjs`);\n- ✅ convert `commonjs` to `esm` (enabled for `*.mjs`);\n- ✅ convert `template` with one `expression` to `string`;\n- ✅ convert `equal` to `strict equal`;\n- ✅ convert `indexOf` to `includes`;\n- ✅ convert `replace` to `replaceAll`;\n- ✅ convert `assignment` to `arrow function`;\n- ✅ convert `forEach` to `for...of`;\n- ✅ convert `map` to `for...of`;\n- ✅ convert `reduce` to `for...of`;\n- ✅ convert `Math.sqrt()` to `Math.hypot()`;\n- ✅ extract sequence expressions;\n- ✅ extract object properties;\n- ✅ add `return await`;\n- ✅ remove useless `Promise.resolve`;\n- ✅ convert `Promise.reject` to `throw`;\n- ✅ declare before `reference`;\n- ✅ declare `undefined variables`;\n- ✅ declare `imports` first;\n- ✅ apply `as` type assertions;\n- ✅ apply `utility types`;\n- ✅ apply `array.at`;\n- ✅ apply `filter(Boolean)`;\n- ✅ apply [isArray](https://web.mit.edu/jwalden/www/isArray.html);\n- ✅ apply `if condition`;\n- ✅ apply `await import`;\n- ✅ apply comparison order;\n- ✅ apply `flatMap()`;\n- ✅ apply `template literals`;\n- ✅ merge duplicate `imports`;\n- ✅ merge duplicate `functions`;\n\n## Install\n\n```\nnpm i putout -D\n```\n\n## Usage\n\n```\nUsage: putout [options] [path]\nOptions:\n   -h, --help                  display this help and exit\n   -v, --version               output version information and exit\n   -f, --format [formatter]    use a specific output format, the default is: 'progress-bar' locally and 'dump' on CI\n   -s, --staged                add staged files when in git repository\n   -i, --interactive           set lint options using interactive menu\n   --fix                       apply fixes of errors to code\n   --fix-count [count = 10]    count of fixes rounds\n   --rulesdir                  use additional rules from directory\n   --transform [replacer]      apply Replacer, for example 'var __a = __b -> const __a = __b', read about Replacer https://git.io/JqcMn\n   --plugins [plugins]         a comma-separated list of plugins to use\n   --enable [rule]             enable the rule and save it to '.putout.json' walking up parent directories\n   --disable [rule]            disable the rule and save it to '.putout.json' walking up parent directories\n   --enable-all                enable all found rules and save them to '.putout.json' walking up parent directories\n   --disable-all               disable all found rules (set baseline) and save them to '.putout.json' walking up parent directories\n   --match [pattern]           read '.putout.json' and convert 'rules' to 'match' according to 'pattern'\n   --fresh                     generate a fresh cache\n   --no-config                 avoid reading '.putout.json'\n   --no-ci                     disable the CI detection\n   --no-cache                  disable the cache\n   --no-worker                 disable worker thread\n```\n\nTo find errors:\n\n```\nputout lib test\n```\n\nTo fix errors:\n\n```\nputout lib test --fix\n```\n\n## Plugins\n\nBy default 🐊**Putout** uses all enabled by default plugins, anyways it can be run with a couple mentioned plugins (split with \",\"):\n\n```sh\nputout lib --plugins remove-debugger,remove-unused-variables\n```\n\n## Environment variables\n\n🐊**Putout** supports next `environment variables`:\n\n- `PUTOUT_FILES` - files that should be processed by putout, divided by \",\";\n- `PUTOUT_CONFIG_FILE` - path to 🐊**Putout** config file;\n- `ESLINT_CONFIG_FILE` - path to **ESLint** config file;\n- `NO_ESLINT` - do not run **ESLint** after 🐊**Putout**;\n- `NO_ESLINT_WARNINGS` - do not show **ESLint** warnings;\n\n```sh\nPUTOUT_FILES=lib,test putout --fix\n```\n\n## Configuration\n\nTo configure create `.putout.json` file and override any of [default options](/packages/putout/putout.json).\n\n### Match\n\nWhen you need to match paths to rules you can use `match` section for this purpose in `.putout.json`:\n\n```json\n{\n    \"match\": {\n        \"server\": {\n            \"remove-process-exit\": true\n        }\n    }\n}\n```\n\n### Ignore\n\nWhen you need to ignore some routes no metter what, you can use `ignore` section in `.putout.json`:\n\n```json\n{\n    \"ignore\": [\"test/fixture\"]\n}\n```\n\n## Plugins\n\n🐊**Putout** supports two types of `plugins`, prefix with:\n\n- ✅ `@putout/plugin-`;\n- ✅ `putout-plugin-`;\n\nTo use your plugin create`npm` package with keywords `putout`, `putout-plugin` and add it to `.putout.json`.\n\nFor example if you need to `remove-something` create 🐊[**Putout**](https://github.com/coderaiser/putout) plugin with name `putout-plugin-remove-something` and it to `package.json`:\n\n```json\n{\n    \"plugins\": [\"remove-something\"]\n}\n```\n\n## Codemods\n\n🐊**Putout** supports `codemodes` in the similar to plugins way, just create a directory `~/.putout` and put your plugins there. Here is example: [convert-tape-to-supertape](https://github.com/coderaiser/putout/tree/master/codemods/plugin-convert-tape-to-supertape) and [this is examples of work](https://github.com/coderaiser/putout/commit/ad02cebc344ce73cdee668cffc5078bf08830d52).\n\n## API\n\nAll examples works both in **ESM** and **CommonJS**.\n\n**CommonJS**:\n\n```js\nconst {putout} = require('putout');\n```\n\n**ESM**:\n\n```js\nimport {putout} from 'putout';\n```\n\n### putout(source, options)\n\n```js\nimport {putout} from 'putout';\n\nconst source = `\n    const t = 'hello';\n    const m = t + '!';\n    console.log(t);\n`;\n\nputout(source, {\n    plugins: ['remove-unused-variables'],\n});\n// returns\n`\nconst t = 'hello';\nconsole.log(t);\n`;\n```\n\n### putoutAsync(source, options)\n\n```js\nimport {putoutAsync} from 'putout';\n\nconst source = `\n    const t = 'hello';\n    const m = t + '!';\n    console.log(t);\n`;\n\nawait putoutAsync(source, {\n    plugins: ['remove-unused-variables'],\n});\n// returns\n`\nconst t = 'hello';\nconsole.log(t);\n`;\n```\n\n## License\n\nMIT\n","publish_time":1746392905696,"_cnpm_publish_time":1746392905696,"dist-tags":{"latest":"42.24.2"}}