prettycli icon indicating copy to clipboard operation
prettycli copied to clipboard

Refactored the function parameter usage

Open cg-cnu opened this issue 7 years ago • 2 comments

Hey @siddharthkp

I have made lot of changes and might break the existing tool usage... They are not adding any additional functionality, but improving on the existing code. 🙂

  • Created default parameter values for labels.
  • Standardized the order of parameters across the functions to message, 'label', 'type' / 'options'
  • Erorr: Moved label and options to parameters and added defaults and maintained the same parameter order there as well.
  • Removed duplicate functions for command and link (in fact I would like to keep both functions and add underline for link)

I won't expect you to accept all the changes. Let me know if any of these are helpful. I can do a separate pr for the approved ones. Would like to hear your thought! 😄

cg-cnu avatar Mar 15 '18 07:03 cg-cnu

I have made lot of changes and might break the existing tool usage

lol, never start a pull request with those words 🙈

I'm not actively working on this, so I don't really remember how things work. If you're interesting in contributing, I'd love some test cases before the refactor

siddharthkp avatar Mar 15 '18 10:03 siddharthkp

lol, never start a pull request with those words 🙈

ha ha...! sure! Lesson learned, will use these next time... ;P 😄 imagesource

Jokes aside, will try to add tests 👍

cg-cnu avatar Mar 15 '18 16:03 cg-cnu