typpo / textbelt

Free API for outgoing SMS
https://textbelt.com/
MIT License
3.02k stars 509 forks source link

Lint lib/ #89

Closed sigv closed 7 years ago

sigv commented 7 years ago

The carriers file contains duplicate keys. They have been resolved:

Unused variables were defined in the library. They have been resolved:

The carrier argument in text.send was not documented in the library code. That line of documentation has been added.

The carrier argument in text.send was not being checked as strictly equal to null. The triple-equals operator has now been applied to the comparison.

The requires had bad line breakings before commas. The commas have all been moved to ends of lines instead.

On an unrelated not to lint, the console.log call in the text library has been switched out with an output call to obey the debug setting.

typpo commented 7 years ago

Thanks very much, Valter, this is long overdue for a cleanup :+1:

sigv commented 7 years ago

Yeah, I noticed there are a lot of rough edges. This PR was just implementing the suggestions by JSHint in the lib subdirectory, but it's a start for sure. Happy to help out! 👍