You need to trim whitespace.
You should also add type comments to JS constructor functions.