{"name":"change-file-extension","version":"0.1.0","description":"Change the file extension of a path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/change-file-extension.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"keywords":["change","file","filepath","extension","ext","path","replace","modify","rename","extname","basename","file-extension","file-path"],"devDependencies":{"ava":"^5.3.1","typescript":"^5.2.2","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"fad5a7013c237ff2c8d39b785c63bc346c1df372","bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"homepage":"https://github.com/sindresorhus/change-file-extension#readme","_id":"change-file-extension@0.1.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-k9K/7SnXkSuN5nwl+XyuFZfGmuw4w2V4e8xo4mT0tF5CtUjcFBlCbP2PLvpQQ3e/v7gp3Zeeeqb5neHDgNWswg==","shasum":"57763828497c17e2b8f044d88f3ce8ab23407633","tarball":"http://registry-npm.ywwl.com/change-file-extension/download/change-file-extension-0.1.0.tgz","fileCount":5,"unpackedSize":3797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBf/7Oj7xIBt4c2Hew9CQOkmohkSupd3E4Y5sJjvkmxKAiEA2vfZ2pgFI4xC4WWW/sznNDH7DUPxWdF1pPWMbbE+bFA="}],"size":1735,"noattachment":false,"key":"/change-file-extension/-/change-file-extension-0.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/change-file-extension_0.1.0_1699015119440_0.927117051950338"},"_hasShrinkwrap":false,"readme":"# change-file-extension\n\n> Change the file extension of a path\n\n## Install\n\n```sh\nnpm install change-file-extension\n```\n\n## Usage\n\n```js\nimport changeFileExtension from 'change-file-extension';\n\nchangeFileExtension('foo/bar.txt', 'md');\n//=> 'foo/bar.md'\n\nchangeFileExtension('foo/bar.txt', '.md');\n//=> 'foo/bar.md'\n\nchangeFileExtension('bar.txt', '');\n//=> 'bar'\n```\n\n## API\n\n### changeFileExtension(filePath, extension)\n\n#### filePath\n\nType: `string`\n\nThe file path whose extension needs to be changed.\n\n#### extension\n\nType: `string`\n\nThe new extension to replace the old one.\n\nTo remove the extension, pass an empty string.\n","publish_time":1699015119666,"_cnpm_publish_time":1699015119666,"dist-tags":{"latest":"1.0.0"}}