sindresorhus / pretty-ms

Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`
MIT License
1.08k stars 65 forks source link

Refactor to be more in line with SRP #28

Closed kolyaventuri closed 4 years ago

kolyaventuri commented 6 years ago

Currently the package is defined in a single index.js file. Though it is a small package, it could be refactored to clean up the codebase and be more in line with single responsibility principles. For instance, there are some nested ternaries and an add method is defined within the function export.

I would be willing to take this on and submit a PR, if that's alright!

sindresorhus commented 6 years ago

Sure, good idea, but I think the two open PRs should be merged first.

Would you be able to help review https://github.com/sindresorhus/pretty-ms/pull/25?

kolyaventuri commented 6 years ago

Absolutely! We can leave this one on hold until the other two PRs are merged. I'll take a look at 25

sindresorhus commented 6 years ago

This can now be done if you're still interested @kolyaventuri :)

kolyaventuri commented 6 years ago

I'll take a stab at it!

sindresorhus commented 5 years ago

@kolyaventuri Still interested?

kolyaventuri commented 5 years ago

@sindresorhus hi! Yes, absolutely. Apologies on never getting back to this :joy:

sindresorhus commented 5 years ago

Bump :)