Great post!
I think your lineChecker function would be a great, small refactoring kata. Here's how it looked after I refactored it:
lineChecker
const lineChecker = (line, isFirstLine) => { if (line === "") { return "<br />"; } return isFirstLine ? `<h1>${line}</h1>` : `<p>${line}</p>`; };
Would you mind if I use it as an example and trial ground for a refactoring tool I'm developing? ( marketplace.visualstudio.com/items... )
Thank you for asking, I do not mind at all! I also think your tool is very cool! Thank you for sharing it with me!
Thanks 😊
I was curious how other people would refactor it, so I posted it here: dev.to/p42/how-would-you-refactor-...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great post!
I think your
lineChecker
function would be a great, small refactoring kata. Here's how it looked after I refactored it:Would you mind if I use it as an example and trial ground for a refactoring tool I'm developing? ( marketplace.visualstudio.com/items... )
Thank you for asking, I do not mind at all! I also think your tool is very cool! Thank you for sharing it with me!
Thanks 😊
I was curious how other people would refactor it, so I posted it here: dev.to/p42/how-would-you-refactor-...