Adding default `fileType` config for `js` files re #128

The shared regex variable is mostly a refactor for reuse and wasn't in the original proposal.