Skip to content

Commit

Permalink
simplify #74
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 30, 2016
1 parent 6c7a310 commit 15dff34
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ var objectAssign = require('object-assign');
var replaceExt = require('replace-ext');
var babel = require('babel-core');

function replaceExtension(filepath) {
if (path.extname(filepath)) {
return replaceExt(filepath, '.js');
}

return filepath;
function replaceExtension(fp) {
return path.extname(fp) ? replaceExt(fp, '.js') : fp;
}

module.exports = function (opts) {
Expand Down

0 comments on commit 15dff34

Please sign in to comment.