{"name":"@putout/operator-rename-files","version":"2.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout operator adds ability to rename files to plugins","homepage":"https://github.com/coderaiser/putout/tree/master/packages/operator-rename-files#readme","main":"lib/rename-files.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{"@putout/operator-filesystem":"^5.0.0"},"keywords":["putout","putout-operator","operator","rename-files"],"devDependencies":{"@putout/operator-json":"^2.1.0","@putout/plugin-nodejs":"*","@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","lerna":"^6.0.1","madrun":"^10.0.0","montag":"^1.2.1","nodemon":"^3.0.1","supertape":"^10.0.0","try-catch":"^3.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/operator-rename-files@2.0.0","gitHead":"ab666e6f57c3d0430b6e00c43532adde5b5269dc","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-CM/C9xgm3nW5y/UZGv8BW8QW/48LPTfjpZpaa33tAy1TOZ1FetOslpMfSFaJSF34OCW35HuUyCNioYoNsxH8YA==","shasum":"15a8fa5aeed3026e5ef02ff1784758d909379038","tarball":"http://registry-npm.ywwl.com/@putout/operator-rename-files/download/@putout/operator-rename-files-2.0.0.tgz","fileCount":4,"unpackedSize":5546,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCil8/O6jSbINDPidD2jlgid4yKAmWx7MZGeQxdsoowOwIgDqrS5TkPmmEOSHntC6rde9Kz4O9EXOmEwUuC6dfOrBA="}],"size":2399,"noattachment":false,"key":"/@putout/operator-rename-files/-/@putout/operator-rename-files-2.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/operator-rename-files_2.0.0_1731339414000_0.31892270676712386"},"_hasShrinkwrap":false,"readme":"# @putout/operator-rename-files [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/operator-rename-files.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/operator-rename-files \"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) operator adds ability to rename files to plugins.\n\n## Install\n\n```\nnpm i putout @putout/operator-rename-files\n```\n\n## API\n\nIf you want to create 🐊[**Putout**](https://github.com/coderaiser/putout) `plugin` that will rename files according to your needs just use for **ESM**:\n\n```js\nconst {operator} = require('putout');\nconst {renameFiles} = operator;\n\nmodule.exports = renameFiles({\n    type: 'module',\n    mask: '*.mjs',\n    rename(name) {\n        return name.replace(/mjs$/, 'js');\n    },\n});\n```\n\nAnd for **CommonJS**:\n\n```js\nmodule.exports = renameFiles({\n    type: 'commonjs',\n    mask: '*.cjs',\n    rename(name) {\n        return name.replace(/cjs$/, 'js');\n    },\n});\n```\n\nWhen you do not need to check `type` field of `package.json`, avoid `type` field:\n\n```js\nmodule.exports = renameFiles({\n    mask: '*.cjs',\n    rename(name) {\n        return name.replace(/cjs$/, 'js');\n    },\n});\n```\n\nYou can also use [`redlint`](https://github.com/putoutjs/redlint) directly.\n\n## License\n\nMIT\n","publish_time":1731339414166,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1731339414166,"dist-tags":{"latest":"6.2.1"}}