{"_id":"change-file-extension","_rev":"2-4a3dde9989a97053e13f446eba69575b","name":"change-file-extension","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"change-file-extension","version":"0.1.0","keywords":["change","file","filepath","extension","ext","path","replace","modify","rename","extname","basename","file-extension","file-path"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"change-file-extension@0.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/change-file-extension#readme","bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"dist":{"shasum":"57763828497c17e2b8f044d88f3ce8ab23407633","tarball":"https://registry.npmjs.org/change-file-extension/-/change-file-extension-0.1.0.tgz","fileCount":5,"integrity":"sha512-k9K/7SnXkSuN5nwl+XyuFZfGmuw4w2V4e8xo4mT0tF5CtUjcFBlCbP2PLvpQQ3e/v7gp3Zeeeqb5neHDgNWswg==","signatures":[{"sig":"MEUCIBf/7Oj7xIBt4c2Hew9CQOkmohkSupd3E4Y5sJjvkmxKAiEA2vfZ2pgFI4xC4WWW/sznNDH7DUPxWdF1pPWMbbE+bFA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3797},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"fad5a7013c237ff2c8d39b785c63bc346c1df372","scripts":{"test":"xo && ava && tsc index.d.ts"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/change-file-extension.git","type":"git"},"_npmVersion":"9.2.0","description":"Change the file extension of a path","directories":{},"_nodeVersion":"18.18.2","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^5.3.1","typescript":"^5.2.2"},"_npmOperationalInternal":{"tmp":"tmp/change-file-extension_0.1.0_1699015119440_0.927117051950338","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"change-file-extension","version":"0.1.1","keywords":["change","file","filepath","extension","ext","path","replace","modify","rename","extname","basename","file-extension","file-path"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"change-file-extension@0.1.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/change-file-extension#readme","bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"dist":{"shasum":"46a342c4f327cdc0578ac7fc8412c364561da677","tarball":"https://registry.npmjs.org/change-file-extension/-/change-file-extension-0.1.1.tgz","fileCount":5,"integrity":"sha512-lB0j9teu8JtDPDHRfU8pNH33w4wMu5bOaKoT4PxH+AKugBrIfpiJMTTKIm0TErNeJPkeQEgvH31YpccTwOKPRg==","signatures":[{"sig":"MEYCIQDDS1TJ5nz3JZCh5Gr92skVne4t/w/EvfznPmGjySrfKAIhAOPq8YOI0uk8jFuV0JBlQerTIGzCK4d/G3W6gV/1NLIe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3821},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"7881bb313a33b58b0e9e4f6b39c2fddbf9de039a","scripts":{"test":"xo && ava && tsc index.d.ts"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/change-file-extension.git","type":"git"},"_npmVersion":"9.2.0","description":"Change the file extension of a path","directories":{},"sideEffects":false,"_nodeVersion":"21.2.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^5.3.1","typescript":"^5.2.2"},"_npmOperationalInternal":{"tmp":"tmp/change-file-extension_0.1.1_1703521058736_0.8908620255615936","host":"s3://npm-registry-packages"}},"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":"https://registry.npmjs.org/change-file-extension/-/change-file-extension-1.0.0.tgz","fileCount":5,"unpackedSize":3821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRAra+SSkNBE2iEn2GH1MLkuFYQpS1EHh9Z4vcII4pxAIgL/mt0T3mWqZWt2e0txynG36uB3+8tFUmTq44BS5ygVc="}]},"_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_1.0.0_1723966969549_0.32796502555988893"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-03T12:38:39.439Z","modified":"2024-08-18T07:42:49.975Z","0.1.0":"2023-11-03T12:38:39.666Z","0.1.1":"2023-12-25T16:17:39.029Z","1.0.0":"2024-08-18T07:42:49.786Z"},"bugs":{"url":"https://github.com/sindresorhus/change-file-extension/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/change-file-extension#readme","keywords":["change","file","filepath","extension","ext","path","replace","modify","rename","extname","basename","file-extension","file-path"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/change-file-extension.git"},"description":"Change the file extension of a path","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"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","readmeFilename":"readme.md"}