-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
13 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +0,0 @@ | ||
import unescapeFn from 'lodash.unescape'; | ||
|
||
/** Fixes bug where lodash.unescape does not unescape double quotes in our code base */ | ||
export default function unescape(_s: string) { | ||
const s = _s.trim(); | ||
// Check to see if string includes the double quote character; if string does not have it, this is slightly faster | ||
// https://perf.link/#eyJpZCI6ImdubDgwbmp6cWduIiwidGl0bGUiOiJGaW5kaW5nIG51bWJlcnMgaW4gYW4gYXJyYXkgb2YgMTAwMCIsImJlZm9yZSI6ImNvbnN0IHN0ciA9IFwiVGhpcyAgaXMgYSBzdHJpbmdcIiIsInRlc3RzIjpbeyJuYW1lIjoiVGVzdCBDYXNlIiwiY29kZSI6InN0ci5yZXBsYWNlQWxsKFwiJiMzOTtcIiwgJ1wiJykiLCJydW5zIjpbOTgwMDAsMTEwMDAsMTQxNTAwMCw5MzMwMDAsMjY5NDAwMCw3NzQ1MDAwLDkwMDAsNTMwMDAwLDcxMzcwMDAsMTQ5OTAwMCwxNTE0MDAwLDUyMzAwMCwxNjMzMDAwLDExMzkwMDAsMTM1MzAwMCwxNzAxMDAwLDMxMzQwMDAsNTI3MDAwLDEwMDAwMCwyMTgzMDAwLDkwMDAsMTY0NjAwMCwxMDAwLDI5OTMwMDAsMzU0MDAwLDM1NzQwMDAsMTQ3MTAwMCwxMTAwMCwxNTMwMDAwLDM4OTQwMDAsNTMzMDAwLDE0OTkwMDAsNzEzMDAwMCwyMzk2MDAwLDI0NDAwMCw4NDUwMDAsMTY1MjAwMCwzMDAwMCwxMDAwMDAsMjU5MTAwMCw5MDAwLDU3MzAwMCw4OTYwMDAsMjU4NzAwMCwzNTE2MDAwLDE0ODUwMDAsMzU3ODAwMCwyMzY4MDAwLDE0OTkwMDAsMjA3NzAwMCw4NTUwMDAsNDQxNTAwMCw0NjE0MDAwLDExNjMwMDAsMTI2NzAwMCwxNzMyMDAwLDExMDAwLDE2NDYwMDAsMTEwMDAsNDYxMTAwMCwxNjE2MDAwLDkwMDAsMzEwNTAwMCw0MjUwMDAwLDEwMDAwLDE2NzQwMDAsMzk2MDAwLDYxNzUwMDAsNjQ0MDAwLDE0OTkwMDAsMTA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