renaming endpoint to deviceToken and adding JS doc for the 'unregister'
Refactoring the registerWithServer function to accept an 'options' object. Adding more JSDoc to the file
Applying feedback of the review
whitespace :-)
using literal obj in doc; removing explicit null/undefined check; and simplifying the JSON.stringify()