@truto/truto-jsonata 2.0.0 → 2.0.1
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/README.md +1 -1
- package/dist/browser/index.js +12 -5
- package/dist/browser/index.js.map +3 -3
- package/dist/browser/presets/core.js +12 -5
- package/dist/browser/presets/core.js.map +3 -3
- package/dist/cjs/index.cjs +12 -5
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/presets/core.cjs +12 -5
- package/dist/cjs/presets/core.cjs.map +3 -3
- package/dist/esm/index.js +12 -5
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/presets/core.js +12 -5
- package/dist/esm/presets/core.js.map +3 -3
- package/dist/functions/base64encode.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10660,11 +10660,18 @@ var base64decode_default = base64decode;
|
|
|
10660
10660
|
|
|
10661
10661
|
// src/functions/base64encode.ts
|
|
10662
10662
|
function base64encode(input, urlSafe = false) {
|
|
10663
|
+
let bytes;
|
|
10664
|
+
if (input instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && input instanceof SharedArrayBuffer) {
|
|
10665
|
+
bytes = new Uint8Array(input);
|
|
10666
|
+
} else if (input instanceof Uint8Array) {
|
|
10667
|
+
bytes = input;
|
|
10668
|
+
} else {
|
|
10669
|
+
bytes = new TextEncoder().encode(input);
|
|
10670
|
+
}
|
|
10671
|
+
const CHUNK = 8192;
|
|
10663
10672
|
let binary = "";
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
for (let i = 0;i < len; i++) {
|
|
10667
|
-
binary += String.fromCharCode(bytes[i]);
|
|
10673
|
+
for (let i = 0;i < bytes.length; i += CHUNK) {
|
|
10674
|
+
binary += String.fromCharCode.apply(null, Array.from(bytes.subarray(i, i + CHUNK)));
|
|
10668
10675
|
}
|
|
10669
10676
|
let base64 = btoa(binary);
|
|
10670
10677
|
if (urlSafe) {
|
|
@@ -12826,4 +12833,4 @@ function registerCoreExtensions(expression) {
|
|
|
12826
12833
|
return expression;
|
|
12827
12834
|
}
|
|
12828
12835
|
|
|
12829
|
-
//# debugId=
|
|
12836
|
+
//# debugId=24F246DE40EE806764756E2164756E21
|