Skip to content
This repository has been archived by the owner on Nov 7, 2020. It is now read-only.

Alternate solution for convertToBinary? #112

Open
notaurologist opened this issue Nov 20, 2016 · 0 comments
Open

Alternate solution for convertToBinary? #112

notaurologist opened this issue Nov 20, 2016 · 0 comments

Comments

@notaurologist
Copy link

I'm curious about the solution for convertToBinary. Currently, it's breaking off each bit and sticking it into an array to join later. I used num.toString(2) for the initial conversion and left-padded as necessary. Am I missing something? Does that solution not work everywhere? AFAIK, it is, but I may be wrong. Perhaps it's a performance issue, but it seems like it wouldn't be.

I can send a PR if there's agreement here.

@notaurologist notaurologist changed the title Alternate solution for convertToBinary? Alternate solution for convertToBinary? Nov 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant