From d1d9f00b1bd660842addf5e6b1d1b64c852a9eea Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 5 Nov 2023 17:16:09 +0800 Subject: added hover prefixer --- node_modules/source-map/lib/base64.js | 53 ++--------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) (limited to 'node_modules/source-map/lib/base64.js') diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js index 8aa86b30..b9ca3199 100644 --- a/node_modules/source-map/lib/base64.js +++ b/node_modules/source-map/lib/base64.js @@ -5,63 +5,14 @@ * http://opensource.org/licenses/BSD-3-Clause */ -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); +const intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); /** * Encode an integer in the range of 0 to 63 to a single base 64 digit. */ -exports.encode = function (number) { +exports.encode = function(number) { if (0 <= number && number < intToCharMap.length) { return intToCharMap[number]; } throw new TypeError("Must be between 0 and 63: " + number); }; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; -- cgit v1.2.3