AmasiaNalbandian / static-site-generator

A CLI tool which creates a static html file from a text file that was provided.
MIT License
2 stars 2 forks source link

Use path module instead of processing filenames as strings #14

Open humphd opened 3 years ago

humphd commented 3 years ago

The built-in node path module has lots of methods to help you work with parts of a filename, so you don't have to do string manipulation.

humphd commented 3 years ago

https://github.com/AmasiaNalbandian/static-site-generator/blob/main/src/main.js#L117 is another example