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

randexp: Convert string to regexp #50

Merged
merged 2 commits into from
Feb 23, 2018
Merged

randexp: Convert string to regexp #50

merged 2 commits into from
Feb 23, 2018

Conversation

maximilian-krauss
Copy link
Contributor

Fixes #49

@codecov
Copy link

codecov bot commented Feb 22, 2018

Codecov Report

Merging #50 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #50   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         103    105    +2     
  Branches       34     35    +1     
=====================================
+ Hits          103    105    +2
Impacted Files Coverage Δ
lib/randexp.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d76f4c0...59d0950. Read the comment docs.

lib/randexp.js Outdated
if (regexp._randexp === undefined) {
randexp = new RandExp(regexp, m);
regexp._randexp = randexp;
var regex = regexp instanceof RegExp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this diff would look cleaner if this line overwrite the variable regexp, instead of creating a new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 🙂

@fent fent merged commit 15eb60a into fent:master Feb 23, 2018
@fent
Copy link
Owner

fent commented Feb 23, 2018

Thank you!

@maximilian-krauss maximilian-krauss deleted the fixes-call-with-string branch February 24, 2018 11:13
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.

2 participants