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

Skip parsing if file doesn't contain assertions #6

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

goto-bus-stop
Copy link
Contributor

Unassertify is quite an expensive transform, because it does full
parsing and code generation. That only needs to be done for files that
contain assertions, though. This patch adds a quick check: if the string
assert does not even occur in the file, we'll just skip it, saving
some time.

Unassertify is quite an expensive transform, because it does full
parsing and code generation. That only needs to be done for files that
contain assertions, though. This patch adds a quick check: if the string
`assert` does not even occur in the file, we'll just skip it, saving
some time.
@twada
Copy link
Member

twada commented Apr 19, 2018

@goto-bus-stop Thank you for your contribution!
I'm going to merge this PR and cut a new release ASAP.

@twada twada merged commit 38a868d into unassert-js:master Apr 19, 2018
@twada
Copy link
Member

twada commented Apr 19, 2018

v2.1.1 has been released. Thanks!

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