{"_id":"change-file-extension","_rev":"961054","name":"change-file-extension","description":"Change the file extension of a path","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2024-08-28T19:21:37.000Z","created":"2023-11-03T12:38:39.666Z","1.0.0":"2024-08-18T07:42:49.786Z","0.1.1":"2023-12-25T16:17:39.029Z","0.1.0":"2023-11-03T12:38:39.666Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/change-file-extension.git"},"versions":{"1.0.0":{"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,"publish_time":1723966969786,"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_cnpm_publish_time":1723966969786},"0.1.1":{"name":"change-file-extension","version":"0.1.1","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":"^5.3.1","typescript":"^5.2.2","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"7881bb313a33b58b0e9e4f6b39c2fddbf9de039a","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.1","_nodeVersion":"21.2.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-lB0j9teu8JtDPDHRfU8pNH33w4wMu5bOaKoT4PxH+AKugBrIfpiJMTTKIm0TErNeJPkeQEgvH31YpccTwOKPRg==","shasum":"46a342c4f327cdc0578ac7fc8412c364561da677","tarball":"http://registry-npm.ywwl.com/change-file-extension/download/change-file-extension-0.1.1.tgz","fileCount":5,"unpackedSize":3821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDS1TJ5nz3JZCh5Gr92skVne4t/w/EvfznPmGjySrfKAIhAOPq8YOI0uk8jFuV0JBlQerTIGzCK4d/G3W6gV/1NLIe"}],"size":1771,"noattachment":false,"key":"/change-file-extension/-/change-file-extension-0.1.1.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.1_1703521058736_0.8908620255615936"},"_hasShrinkwrap":false,"publish_time":1703521059029,"_cnpm_publish_time":1703521059029},"0.1.0":{"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,"publish_time":1699015119666,"_cnpm_publish_time":1699015119666}},"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","_attachments":{},"homepage":"https://github.com/sindresorhus/change-file-extension#readme","bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"license":"MIT"}