{"name":"@putout/operator-rename-files","version":"3.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":"^7.0.0"},"keywords":["putout","putout-operator","operator","rename-files"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/operator-json":"^2.1.0","@putout/plugin-nodejs":"*","@putout/test":"^12.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0","montag":"^1.2.1","nodemon":"^3.0.1","supertape":"^10.0.0","try-catch":"^3.0.0"},"peerDependencies":{"putout":">=39"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/operator-rename-files@3.0.0","gitHead":"cc282630041813c46d5a59da6f10c3437d48bf84","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-y/FU7tIUkaZtCbxBoLyv6os09fgCSY8KVUjxd6Pljm1y+UVNTWJjZjmIUtv373N2voTVAHjbk85QHH97poeEQw==","shasum":"6be6848bd5dc5e7cb1111bf6f1acf807d65e82ec","tarball":"http://registry-npm.ywwl.com/@putout/operator-rename-files/download/@putout/operator-rename-files-3.0.0.tgz","fileCount":4,"unpackedSize":5560,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCo/RIuDfAgKjUW8sA/byWg/w9znE9aFAvq4VKHe0yWVwIgcuvZ4IdgBixi0IFxrGq84jpLFDyq7+4ezuDh0nVqd0M="}],"size":2400,"noattachment":false,"key":"/@putout/operator-rename-files/-/@putout/operator-rename-files-3.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/operator-rename-files_3.0.0_1742597303400_0.32840401084817117"},"_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":1742597303558,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1742597303558,"dist-tags":{"latest":"6.2.1"}}