@frsource/base64 1.0.204 → 1.0.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +43 -34
- package/dist/index.mjs +18 -33
- package/package.json +9 -4
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encodes given string.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} input - Text to encode
|
|
5
|
+
*/
|
|
6
|
+
declare const encode: (input: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Decodes given string.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} input - Text to decode
|
|
11
|
+
*/
|
|
12
|
+
declare const decode: (input: string) => string;
|
|
13
|
+
|
|
14
|
+
export { decode, encode };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {string} input - Text to encode
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
declare const encode: (input: string) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Decodes given string.
|
|
9
9
|
*
|
|
10
10
|
* @param {string} input - Text to decode
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
declare const decode: (input: string) => string;
|
|
13
|
+
|
|
14
|
+
export { decode, encode };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// index.ts
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
decode: () => decode,
|
|
23
|
+
encode: () => encode
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
27
|
+
var encode = (input) => {
|
|
28
|
+
let output = "";
|
|
9
29
|
let i = 0;
|
|
10
30
|
input = _utf8_encode(input);
|
|
11
31
|
while (i < input.length) {
|
|
@@ -25,15 +45,10 @@ const encode = input => {
|
|
|
25
45
|
}
|
|
26
46
|
return output;
|
|
27
47
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
* @param {string} input - Text to decode
|
|
32
|
-
*/
|
|
33
|
-
const decode = input => {
|
|
34
|
-
let output = '';
|
|
48
|
+
var decode = (input) => {
|
|
49
|
+
let output = "";
|
|
35
50
|
let i = 0;
|
|
36
|
-
input = input.replace(/[^A-Za-z0-9+/=]/g,
|
|
51
|
+
input = input.replace(/[^A-Za-z0-9+/=]/g, "");
|
|
37
52
|
while (i < input.length) {
|
|
38
53
|
const enc1 = _keyStr.indexOf(input.charAt(i++));
|
|
39
54
|
const enc2 = _keyStr.indexOf(input.charAt(i++));
|
|
@@ -52,25 +67,19 @@ const decode = input => {
|
|
|
52
67
|
}
|
|
53
68
|
return _utf8_decode(output);
|
|
54
69
|
};
|
|
55
|
-
/**
|
|
56
|
-
* (private method) does a UTF-8 encoding
|
|
57
|
-
*
|
|
58
|
-
* @private
|
|
59
|
-
* @param {string} string - Text to encode
|
|
60
|
-
*/
|
|
61
70
|
function _utf8_encode(str) {
|
|
62
|
-
return encodeURIComponent(str).replace(
|
|
71
|
+
return encodeURIComponent(str).replace(
|
|
72
|
+
/%([0-9A-F]{2})/g,
|
|
73
|
+
(_, p1) => String.fromCharCode(parseInt(p1, 16))
|
|
74
|
+
);
|
|
63
75
|
}
|
|
64
|
-
/**
|
|
65
|
-
* (private method - do not use) does a UTF-8 decoding
|
|
66
|
-
*
|
|
67
|
-
* @private
|
|
68
|
-
* @param {string} utftext - UTF-8 text to dencode
|
|
69
|
-
*/
|
|
70
76
|
function _utf8_decode(str) {
|
|
71
|
-
return decodeURIComponent(
|
|
77
|
+
return decodeURIComponent(
|
|
78
|
+
str.split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
79
|
+
);
|
|
72
80
|
}
|
|
73
|
-
|
|
74
|
-
exports
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
decode,
|
|
84
|
+
encode
|
|
85
|
+
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @param {string} input - Text to encode
|
|
6
|
-
*/
|
|
7
|
-
const encode = input => {
|
|
8
|
-
let output = '';
|
|
1
|
+
// index.ts
|
|
2
|
+
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
3
|
+
var encode = (input) => {
|
|
4
|
+
let output = "";
|
|
9
5
|
let i = 0;
|
|
10
6
|
input = _utf8_encode(input);
|
|
11
7
|
while (i < input.length) {
|
|
@@ -25,15 +21,10 @@ const encode = input => {
|
|
|
25
21
|
}
|
|
26
22
|
return output;
|
|
27
23
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
* @param {string} input - Text to decode
|
|
32
|
-
*/
|
|
33
|
-
const decode = input => {
|
|
34
|
-
let output = '';
|
|
24
|
+
var decode = (input) => {
|
|
25
|
+
let output = "";
|
|
35
26
|
let i = 0;
|
|
36
|
-
input = input.replace(/[^A-Za-z0-9+/=]/g,
|
|
27
|
+
input = input.replace(/[^A-Za-z0-9+/=]/g, "");
|
|
37
28
|
while (i < input.length) {
|
|
38
29
|
const enc1 = _keyStr.indexOf(input.charAt(i++));
|
|
39
30
|
const enc2 = _keyStr.indexOf(input.charAt(i++));
|
|
@@ -52,24 +43,18 @@ const decode = input => {
|
|
|
52
43
|
}
|
|
53
44
|
return _utf8_decode(output);
|
|
54
45
|
};
|
|
55
|
-
/**
|
|
56
|
-
* (private method) does a UTF-8 encoding
|
|
57
|
-
*
|
|
58
|
-
* @private
|
|
59
|
-
* @param {string} string - Text to encode
|
|
60
|
-
*/
|
|
61
46
|
function _utf8_encode(str) {
|
|
62
|
-
return encodeURIComponent(str).replace(
|
|
47
|
+
return encodeURIComponent(str).replace(
|
|
48
|
+
/%([0-9A-F]{2})/g,
|
|
49
|
+
(_, p1) => String.fromCharCode(parseInt(p1, 16))
|
|
50
|
+
);
|
|
63
51
|
}
|
|
64
|
-
/**
|
|
65
|
-
* (private method - do not use) does a UTF-8 decoding
|
|
66
|
-
*
|
|
67
|
-
* @private
|
|
68
|
-
* @param {string} utftext - UTF-8 text to dencode
|
|
69
|
-
*/
|
|
70
52
|
function _utf8_decode(str) {
|
|
71
|
-
return decodeURIComponent(
|
|
53
|
+
return decodeURIComponent(
|
|
54
|
+
str.split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
55
|
+
);
|
|
72
56
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
export {
|
|
58
|
+
decode,
|
|
59
|
+
encode
|
|
60
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frsource/base64",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.205",
|
|
4
4
|
"description": "base64 encoder/decoder with UTF-8 support 📔",
|
|
5
5
|
"repository": "https://github.com/FRSOURCE/base64.git",
|
|
6
6
|
"homepage": "http://www.webtoolkit.info/javascript_base64.html",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "
|
|
8
|
+
"build": "tsup",
|
|
9
9
|
"lint": "eslint . && prettier . --check",
|
|
10
10
|
"fix": "pnpm eslint --fix && prettier . --write",
|
|
11
11
|
"prepack": "pnpm build",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"del-cli": "7.0.0",
|
|
46
46
|
"eslint": "10.1.0",
|
|
47
47
|
"globals": "17.4.0",
|
|
48
|
-
"
|
|
48
|
+
"tsup": "8.5.1",
|
|
49
49
|
"prettier": "3.8.1",
|
|
50
50
|
"semantic-release": "25.0.3",
|
|
51
51
|
"typescript": "5.9.3",
|
|
@@ -60,5 +60,10 @@
|
|
|
60
60
|
"README.md",
|
|
61
61
|
"LICENSE"
|
|
62
62
|
],
|
|
63
|
-
"funding": "https://buymeacoffee.com/frsource"
|
|
63
|
+
"funding": "https://buymeacoffee.com/frsource",
|
|
64
|
+
"pnpm": {
|
|
65
|
+
"onlyBuiltDependencies": [
|
|
66
|
+
"esbuild"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
64
69
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../index.ts"],"sourcesContent":["const _keyStr =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n/**\n * Encodes given string.\n *\n * @param {string} input - Text to encode\n */\nexport const encode = (input: string) => {\n let output = '';\n let i = 0;\n\n input = _utf8_encode(input);\n\n while (i < input.length) {\n const chr1 = input.charCodeAt(i++);\n const chr2 = input.charCodeAt(i++);\n const chr3 = input.charCodeAt(i++);\n\n const enc1 = chr1 >> 2;\n const enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n let enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n let enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output =\n output +\n _keyStr.charAt(enc1) +\n _keyStr.charAt(enc2) +\n _keyStr.charAt(enc3) +\n _keyStr.charAt(enc4);\n }\n\n return output;\n};\n\n/**\n * Decodes given string.\n *\n * @param {string} input - Text to decode\n */\nexport const decode = (input: string) => {\n let output = '';\n let i = 0;\n\n input = input.replace(/[^A-Za-z0-9+/=]/g, '');\n\n while (i < input.length) {\n const enc1 = _keyStr.indexOf(input.charAt(i++));\n const enc2 = _keyStr.indexOf(input.charAt(i++));\n const enc3 = _keyStr.indexOf(input.charAt(i++));\n const enc4 = _keyStr.indexOf(input.charAt(i++));\n\n const chr1 = (enc1 << 2) | (enc2 >> 4);\n const chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n const chr3 = ((enc3 & 3) << 6) | enc4;\n\n output += String.fromCharCode(chr1);\n\n if (enc3 !== 64) {\n output += String.fromCharCode(chr2);\n }\n if (enc4 !== 64) {\n output += String.fromCharCode(chr3);\n }\n }\n\n return _utf8_decode(output);\n};\n\n/**\n * (private method) does a UTF-8 encoding\n *\n * @private\n * @param {string} string - Text to encode\n */\nfunction _utf8_encode(str: string): string {\n return encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) =>\n String.fromCharCode(parseInt(p1, 16)),\n );\n}\n\n/**\n * (private method - do not use) does a UTF-8 decoding\n *\n * @private\n * @param {string} utftext - UTF-8 text to dencode\n */\nfunction _utf8_decode(str: string): string {\n return decodeURIComponent(\n str\n .split('')\n .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''),\n );\n}\n"],"names":["_keyStr","encode","input","output","i","_utf8_encode","length","chr1","charCodeAt","chr2","chr3","enc1","enc2","enc3","enc4","isNaN","charAt","decode","replace","indexOf","String","fromCharCode","_utf8_decode","str","encodeURIComponent","_","p1","parseInt","decodeURIComponent","split","map","c","toString","slice","join"],"mappings":"AAAA,MAAMA,OAAO,GACX,mEAAmE,CAAA;AAErE;;;;AAIG;AACUC,MAAAA,MAAM,GAAIC,KAAa,IAAI;EACtC,IAAIC,MAAM,GAAG,EAAE,CAAA;EACf,IAAIC,CAAC,GAAG,CAAC,CAAA;AAETF,EAAAA,KAAK,GAAGG,YAAY,CAACH,KAAK,CAAC,CAAA;AAE3B,EAAA,OAAOE,CAAC,GAAGF,KAAK,CAACI,MAAM,EAAE;IACvB,MAAMC,IAAI,GAAGL,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;IAClC,MAAMK,IAAI,GAAGP,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;IAClC,MAAMM,IAAI,GAAGR,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;AAElC,IAAA,MAAMO,IAAI,GAAGJ,IAAI,IAAI,CAAC,CAAA;IACtB,MAAMK,IAAI,GAAI,CAACL,IAAI,GAAG,CAAC,KAAK,CAAC,GAAKE,IAAI,IAAI,CAAE,CAAA;IAC5C,IAAII,IAAI,GAAI,CAACJ,IAAI,GAAG,EAAE,KAAK,CAAC,GAAKC,IAAI,IAAI,CAAE,CAAA;AAC3C,IAAA,IAAII,IAAI,GAAGJ,IAAI,GAAG,EAAE,CAAA;AAEpB,IAAA,IAAIK,KAAK,CAACN,IAAI,CAAC,EAAE;MACfI,IAAI,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cesContent":["const _keyStr =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n/**\n * Encodes given string.\n *\n * @param {string} input - Text to encode\n */\nexport const encode = (input: string) => {\n let output = '';\n let i = 0;\n\n input = _utf8_encode(input);\n\n while (i < input.length) {\n const chr1 = input.charCodeAt(i++);\n const chr2 = input.charCodeAt(i++);\n const chr3 = input.charCodeAt(i++);\n\n const enc1 = chr1 >> 2;\n const enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n let enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n let enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output =\n output +\n _keyStr.charAt(enc1) +\n _keyStr.charAt(enc2) +\n _keyStr.charAt(enc3) +\n _keyStr.charAt(enc4);\n }\n\n return output;\n};\n\n/**\n * Decodes given string.\n *\n * @param {string} input - Text to decode\n */\nexport const decode = (input: string) => {\n let output = '';\n let i = 0;\n\n input = input.replace(/[^A-Za-z0-9+/=]/g, '');\n\n while (i < input.length) {\n const enc1 = _keyStr.indexOf(input.charAt(i++));\n const enc2 = _keyStr.indexOf(input.charAt(i++));\n const enc3 = _keyStr.indexOf(input.charAt(i++));\n const enc4 = _keyStr.indexOf(input.charAt(i++));\n\n const chr1 = (enc1 << 2) | (enc2 >> 4);\n const chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n const chr3 = ((enc3 & 3) << 6) | enc4;\n\n output += String.fromCharCode(chr1);\n\n if (enc3 !== 64) {\n output += String.fromCharCode(chr2);\n }\n if (enc4 !== 64) {\n output += String.fromCharCode(chr3);\n }\n }\n\n return _utf8_decode(output);\n};\n\n/**\n * (private method) does a UTF-8 encoding\n *\n * @private\n * @param {string} string - Text to encode\n */\nfunction _utf8_encode(str: string): string {\n return encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) =>\n String.fromCharCode(parseInt(p1, 16)),\n );\n}\n\n/**\n * (private method - do not use) does a UTF-8 decoding\n *\n * @private\n * @param {string} utftext - UTF-8 text to dencode\n */\nfunction _utf8_decode(str: string): string {\n return decodeURIComponent(\n str\n .split('')\n .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''),\n );\n}\n"],"names":["_keyStr","encode","input","output","i","_utf8_encode","length","chr1","charCodeAt","chr2","chr3","enc1","enc2","enc3","enc4","isNaN","charAt","decode","replace","indexOf","String","fromCharCode","_utf8_decode","str","encodeURIComponent","_","p1","parseInt","decodeURIComponent","split","map","c","toString","slice","join"],"mappings":"AAAA,MAAMA,OAAO,GACX,mEAAmE,CAAA;AAErE;;;;AAIG;AACUC,MAAAA,MAAM,GAAIC,KAAa,IAAI;EACtC,IAAIC,MAAM,GAAG,EAAE,CAAA;EACf,IAAIC,CAAC,GAAG,CAAC,CAAA;AAETF,EAAAA,KAAK,GAAGG,YAAY,CAACH,KAAK,CAAC,CAAA;AAE3B,EAAA,OAAOE,CAAC,GAAGF,KAAK,CAACI,MAAM,EAAE;IACvB,MAAMC,IAAI,GAAGL,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;IAClC,MAAMK,IAAI,GAAGP,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;IAClC,MAAMM,IAAI,GAAGR,KAAK,CAACM,UAAU,CAACJ,CAAC,EAAE,CAAC,CAAA;AAElC,IAAA,MAAMO,IAAI,GAAGJ,IAAI,IAAI,CAAC,CAAA;IACtB,MAAMK,IAAI,GAAI,CAACL,IAAI,GAAG,CAAC,KAAK,CAAC,GAAKE,IAAI,IAAI,CAAE,CAAA;IAC5C,IAAII,IAAI,GAAI,CAACJ,IAAI,GAAG,EAAE,KAAK,CAAC,GAAKC,IAAI,IAAI,CAAE,CAAA;AAC3C,IAAA,IAAII,IAAI,GAAGJ,IAAI,GAAG,EAAE,CAAA;AAEpB,IAAA,IAAIK,KAAK,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