{"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,"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":1703521059029,"_cnpm_publish_time":1703521059029,"dist-tags":{"latest":"1.0.0"}}