chess.js icon indicating copy to clipboard operation
chess.js copied to clipboard

TODO: camelCase API

Open albertkawmi opened this issue 8 years ago • 1 comments

Hey, if you're accepting PRs I'd be happy to help with this. I would tackle it as follows:

  • [ ] refactor public API by creating camelCase wrappers that call the existing snake_case methods
  • [ ] keep existing snake_case API exposed for backwards compatibility
  • [ ] refactor method signatures to accept both snake_case and camelCase options
  • [ ] update tests as I go along, changing to camelCase*
  • [ ] update README.md to use camelCase, with a note that snake_case is still compatible but deprecated

* This means tests would only use the new camelCase API, hence deprecating the snake_case API. I looked at your tests and considered duplicating the test code but it would be messy and just mean more tests to maintain. What do you think?

If you're happy with the above then I'll go ahead with the refactoring.

Cheers, Albert

albertkawmi avatar Feb 19 '16 13:02 albertkawmi

I'd love to see this personally.

LandonSchropp avatar May 24 '21 20:05 LandonSchropp