Adds a variant-type filter

Also correctly calculates true/false/pos/neg etc for SVs.
You don't use JSX anywhere in this file (nor should you!).

Will the harmony preprocessor still run over this with just `type="text/javascript;harmony=true"` in the `<script>`?