{"name":"change-file-extension","version":"1.0.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"},"sideEffects":false,"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":"^6.1.3","typescript":"^5.5.4","xo":"^0.59.3"},"_id":"change-file-extension@1.0.0","gitHead":"f8b0845a246aba5fcee5ec103515d81bbdffd634","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"homepage":"https://github.com/sindresorhus/change-file-extension#readme","_nodeVersion":"18.20.2","_npmVersion":"10.6.0","dist":{"integrity":"sha512-DkEHhe+KIP6K/R8MwYSXSDS+fDIMo1M7CSwCAZwH1jxKY/e+PB7cazl8lNIQ+deO068Y7hn8+WCRR9fO4yYjzA==","shasum":"54b7a4d40ed4178caae7a71c7434747bea945c59","tarball":"http://registry-npm.ywwl.com/change-file-extension/download/change-file-extension-1.0.0.tgz","fileCount":5,"unpackedSize":3821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRAra+SSkNBE2iEn2GH1MLkuFYQpS1EHh9Z4vcII4pxAIgL/mt0T3mWqZWt2e0txynG36uB3+8tFUmTq44BS5ygVc="}],"size":1774,"noattachment":false,"key":"/change-file-extension/-/change-file-extension-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/change-file-extension_1.0.0_1723966969549_0.32796502555988893"},"_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":1723966969786,"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_cnpm_publish_time":1723966969786,"dist-tags":{"latest":"1.0.0"}}