{"_id":"@cjser/change-file-extension","name":"@cjser/change-file-extension","dist-tags":{"latest":"1.0.0-cjser.2"},"versions":{"1.0.0-cjser.2":{"name":"@cjser/change-file-extension","version":"1.0.0-cjser.2","description":"Change the file extension of a path","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.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","require":"./dist-cjser/index.cjs","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"},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"1.0.0","cjserVersion":2,"original":{"name":"change-file-extension","version":"1.0.0","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"sindresorhus/change-file-extension","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/change-file-extension@1.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-kkwNBFqAwu53lLt/6PILLTxFh3s0WQkgKcTrr7Chxgqga7GonNaGStnM0pDVGoNENdPhetmpFw2REQLlmbj/7Q==","shasum":"3ab37116d1422c30e554101931810bd4671d83ca","tarball":"https://registry.npmjs.org/@cjser/change-file-extension/-/change-file-extension-1.0.0-cjser.2.tgz","fileCount":6,"unpackedSize":7171,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDZJF8s6+yTO5Zpv4wrAsgmFEx+lv02VmEZGGeR3VcqTAiEAgOQMX3Uo9fM9oXEAMZEEAJiyy7vWKn5Sub6mZG1/EEs="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/change-file-extension_1.0.0-cjser.2_1778157622784_0.2825141687938424"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:40:22.688Z","1.0.0-cjser.2":"2026-05-07T12:40:22.937Z","modified":"2026-05-07T12:40:23.173Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Change the file extension of a path","keywords":["change","file","filepath","extension","ext","path","replace","modify","rename","extname","basename","file-extension","file-path"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","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\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/change-file-extension\n","readmeFilename":"readme.md","_rev":"1-d57e9843ed07dba654598b329b983932"}