Option parser for Javascript