use a regex to find the first non-host character #3

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@jackwanders

I was looking into how your url package parsed URLs, and I thought I'd suggest a more compact way to find the index of the first non-host character.

While not super-important, here's a jsperf of the two methods: http://jsperf.com/loop-vs-regex-for-node-url-parse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment