Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Refactored XOR.js to call replace once #221

Merged
merged 2 commits into from
May 8, 2022
Merged

Conversation

Rudxain
Copy link
Contributor

@Rudxain Rudxain commented May 7, 2022

Now it's optimized and refactored to replace the same chars as before and leave other chars intact. The s (dot-all) flag is used to reduce conditional branching. I don't know if this code is actually better in the Node env, I just wanted to suggest this as a possible alternative

Rudxain added 2 commits May 7, 2022 19:12
Now it's optimized and refactored to replace the same chars as before and leave other chars intact. The `s` (dot-all) flag is used to reduce conditional branching
@Rudxain Rudxain marked this pull request as ready for review May 7, 2022 23:24
@Rudxain Rudxain changed the title Refactored to make 1 call to replace Refactored XOR.js to call replace once May 7, 2022
@GDColon GDColon merged commit 862f9d7 into GDColon:master May 8, 2022
@GDColon
Copy link
Owner

GDColon commented May 8, 2022

Looks like I learned something new today

@Rudxain Rudxain deleted the patch-1 branch May 8, 2022 01:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants