Supercraft888 / lFinder

An open source command line interface link checker that will look for dead links. Made for DPS909 for release 0.1
ISC License
1 stars 4 forks source link

Declare lineArray further down in the code #4

Open c3ho opened 4 years ago

c3ho commented 4 years ago

https://github.com/Supercraft888/lFinder/blob/59729eebfe30f8e4b73e7a537ec990d5d6ead113/bin/index.js#L40

I noticed this line is only used here, you can declare it here instead of up top since you're not appending to it or anything. Otherwise you're initializing it as an empty array only to overwrite it with the value from your .filter().

const lineArray = data.toString().split("\n");

c3ho commented 4 years ago

Sorry see issue #5 first before fixing this one