Javascript library who implements method to generate password based on a pattern