tyeung2017 / sunsetly

Searching sun rise and sun set time in UTC by location names and date
https://sunsetly.herokuapp.com/
0 stars 0 forks source link

indexOf(...) !== -1 can be neater #24

Open mattlub opened 6 years ago

mattlub commented 6 years ago

there is a better string method for doingx.indexOf(...) !== -1

https://github.com/tyeung2017/sunsetly/blob/master/src/router.js#L8

Heathercoraje commented 6 years ago

https://github.com/tyeung2017/sunsetly/blob/master/src/router.js#L8

Is this what you meant? If not, please let me know kindly. Thanks !

mattlub commented 6 years ago

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith

mattlub commented 6 years ago

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/includes