Skip to content

(fix): move regex out of fn scope#2

Merged
pabloes merged 2 commits into
edorasware:masterfrom
Maglore:feature/move-regex-out-of-fn-scope
Oct 20, 2017
Merged

(fix): move regex out of fn scope#2
pabloes merged 2 commits into
edorasware:masterfrom
Maglore:feature/move-regex-out-of-fn-scope

Conversation

@Maglore
Copy link
Copy Markdown
Contributor

@Maglore Maglore commented Oct 12, 2017

In the former implementation the regular expression was defined on each call of isUrl(), so this will everytime create a new expression. By relocating it to the outer scope it will be only created and just reused.

see: jsPerf

… to lts/boron (6.11.4), also limit node versions because some dependencies are not working with node 7 in the specified versions, added yarn lock
…pe, so that it will not be created on each function call of isUrl()
@pabloes pabloes merged commit 752fb61 into edorasware:master Oct 20, 2017
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