srexi / purecounterjs

A simple yet configurable native javascript counter which you can count on.
MIT License
122 stars 48 forks source link

Allow user to set default config #14

Closed rzlnhd closed 2 years ago

rzlnhd commented 3 years ago

Hai... I've an idea to allow users set their default config, so they doesn't need to set data-purecounter-X to each element for the same config.

So instead of just initialize the Purecounter class, it also can initialize the default config. If users doesn't initialize their config, it will use our default config. What do you think?

Also, I think you should update the npm package. It's too old by the way...

srexi commented 3 years ago

Yes it is too old I've set some time aside here during next week to update it. Yeah ideally it would merge the Purecounter default config with the provided initial values. That sounds like a great idea

srexi commented 2 years ago

Fixed #26