Skip to content

Commit

Permalink
perf: to Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Feb 19, 2018
1 parent 5b2de29 commit c7e446b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/out-resolve.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import path from 'path';

export default (input, output) => {
export default (input, output) => new Promise(resolve => {
if (output && path.extname(output)) {
return output;
return resolve(output);
}

if (output) {
return path.join(output, input);
return resolve(path.join(output, input));
}

return input;
};
resolve(input);
});

0 comments on commit c7e446b

Please sign in to comment.