Haven't looked at the code so the following is just speculation.
1. You would have to modify the command to handle single line inputs before formatting.
2. You would do something like sublime.load_settings("JsFormat.sublime-settings"). This will return a settings object
3. You can use something like view.settings().get("syntax") to find out what syntax is being used. You can also view.file_name() to get the name of the file and check for the .js extension.
4. Welly ou don't have a fourth point but wanted to ask this. Have you looked at JsFormat
? I believe it uses the same library, and is actively maintained. It may already have some of the features you are looking for.