Closed whitfin closed 7 years ago
As a side note, the byName
property is a little redundant and could probably be removed in future in favour of module.exports = boardLookupTable()
.
@zackehh yayyy!! Thank you for turning this around so quick!
I agree with you on the redundant byName
prop - I used to have a couple of different mappings that were removed. Could you be so kind as to refactor that out (using your suggested approach) as well? Would clean things up nicely! βΊοΈ
also - I am going to mull over the alias filtering for the outputted list. Not sure what is the best call, but I'll let you know later today π
@noopkat sure thing, I'll also push the byName
prop change when you decide so as to reduce the commit noise π Have a great Sunday!
@zackehh hai so I think we should filter out aliases from the returned list, if it's not too much trouble. I know it's more work for you - apologies
@noopkat no problemo! I've pushed that change, let me know if you need anything else changing!
thanks again, @zackehh ! πββοΈ
This PR is a resolution for #122.
It exposes a new static method named
listKnownBoards
using the keys from thebyName
object which is keyed by the board name. I went with this overlistBoards
as I figured that might be useful in future as an instance method which also includes things such as custom boards.I also added aliasing to remove the duplication mentioned in the stream today, and verified that both names come back appropriately in the resulting call to
listKnownBoards
. It might be that we don't want the aliases to come back in this list though, if so just let me know and I can tweak it to omit them.Here's an example output:
Feel free to make any changes you think should be made, or just let me know and I can make them as needed :D!