JavaScript class as a module to add a personal library