Created
April 12, 2023 10:47
-
-
Save virtueer/82d2355f57def7c77c769c7a5ff2d362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const list = rawStr.match(/\\u..../g) || [] | |
for (const code of list) | |
rawStr = rawStr.replace(code, decodeURIComponent(Buffer.from(code.slice(-2), 'hex'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment