Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace String.match() with RegExp.test() #1

Merged
merged 3 commits into from
Apr 24, 2017

Conversation

jcready
Copy link
Contributor

@jcready jcready commented Aug 27, 2016

It's faster and doesn't allocate a new array in memory every time the string matches the regular expression. http://stackoverflow.com/a/10940138/1397319

I've also removed an extraneous loop in the assign() function.

It's faster and doesn't allocate a new array in memory every time the string matches the regular expression. http://stackoverflow.com/a/10940138/1397319

I've also removed an extraneous loop in the `assign()` function.
@coveralls
Copy link

coveralls commented Aug 27, 2016

Coverage Status

Coverage decreased (-0.4%) to 95.238% when pulling 532f9df on jcready:patch-1 into 2f7df9a on analog-nico:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 95.238% when pulling 532f9df on jcready:patch-1 into 2f7df9a on analog-nico:master.

@coveralls
Copy link

coveralls commented Aug 27, 2016

Coverage Status

Coverage increased (+4.3%) to 100.0% when pulling 99735c2 on jcready:patch-1 into 2f7df9a on analog-nico:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+4.3%) to 100.0% when pulling 99735c2 on jcready:patch-1 into 2f7df9a on analog-nico:master.

@coveralls
Copy link

coveralls commented Aug 27, 2016

Coverage Status

Coverage increased (+4.3%) to 100.0% when pulling 99735c2 on jcready:patch-1 into 2f7df9a on analog-nico:master.

@analog-nico
Copy link
Owner

Awesome, thank you @jcready ! I'll package that up next weekend after I am past a deadline if have to focus on right now.

@analog-nico analog-nico merged commit e5cdd97 into analog-nico:master Apr 24, 2017
@analog-nico
Copy link
Owner

I just released version 1.1.0 which includes your changes. Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants