JavaScript rules designer