@hyperfrontend/string-utils
Advanced tools
| 'use strict'; | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _atob = globalThis.atob; | ||
| const _btoa = globalThis.btoa; | ||
| const _Reflect = globalThis.Reflect; | ||
| const createTextEncoder = () => _Reflect.construct(_TextEncoder, []); | ||
| const createTextDecoder = (label, options) => _Reflect.construct(_TextDecoder, [label, options]); | ||
| const atob = (data) => _atob(data); | ||
| const btoa = (data) => _btoa(data); | ||
| exports.atob = atob; | ||
| exports.btoa = btoa; | ||
| exports.createTextDecoder = createTextDecoder; | ||
| exports.createTextEncoder = createTextEncoder; |
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _atob = globalThis.atob; | ||
| const _btoa = globalThis.btoa; | ||
| const _Reflect = globalThis.Reflect; | ||
| const createTextEncoder = () => _Reflect.construct(_TextEncoder, []); | ||
| const createTextDecoder = (label, options) => _Reflect.construct(_TextDecoder, [label, options]); | ||
| const atob = (data) => _atob(data); | ||
| const btoa = (data) => _btoa(data); | ||
| export { atob, btoa, createTextDecoder, createTextEncoder }; |
| 'use strict'; | ||
| const _String = globalThis.String; | ||
| const fromCharCode = _String.fromCharCode; | ||
| exports.fromCharCode = fromCharCode; |
| const _String = globalThis.String; | ||
| const fromCharCode = _String.fromCharCode; | ||
| export { fromCharCode }; |
| 'use strict'; | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| exports.createUint8Array = createUint8Array; |
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| export { createUint8Array }; |
| 'use strict'; | ||
| const { UTF8_DECODER } = require('../../shared-consts/index.cjs.js'); | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| exports.arrayBufferToUtf8String = arrayBufferToUtf8String; |
| import { UTF8_DECODER } from '../../shared-consts/index.esm.js'; | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| export { arrayBufferToUtf8String }; |
| 'use strict'; | ||
| const index_cjs_js = require('../../../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.cjs.js'); | ||
| const UTF8_DECODER = index_cjs_js.createTextDecoder('utf8'); | ||
| exports.UTF8_DECODER = UTF8_DECODER; |
| import { createTextDecoder } from '../../../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.esm.js'; | ||
| const UTF8_DECODER = createTextDecoder('utf8'); | ||
| export { UTF8_DECODER }; |
| 'use strict'; | ||
| const { UTF8_DECODER } = require('../../shared-consts/index.cjs.js'); | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| exports.uint8ArrayToUtf8String = uint8ArrayToUtf8String; |
| import { UTF8_DECODER } from '../../shared-consts/index.esm.js'; | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| export { uint8ArrayToUtf8String }; |
| 'use strict'; | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| exports.base64ToUrlSafeBase64 = base64ToUrlSafeBase64; |
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| export { base64ToUrlSafeBase64 }; |
| 'use strict'; | ||
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| exports.urlSafeBase64ToBase64 = urlSafeBase64ToBase64; |
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| export { urlSafeBase64ToBase64 }; |
+25
-300
| 'use strict'; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _atob = globalThis.atob; | ||
| const _btoa = globalThis.btoa; | ||
| const _Reflect$1 = globalThis.Reflect; | ||
| /** | ||
| * (Safe copy) Creates a new TextEncoder using the captured TextEncoder constructor. | ||
| * Use this instead of `new TextEncoder()`. | ||
| * | ||
| * @returns A new TextEncoder instance. | ||
| */ | ||
| const createTextEncoder = () => _Reflect$1.construct(_TextEncoder, []); | ||
| /** | ||
| * (Safe copy) Creates a new TextDecoder using the captured TextDecoder constructor. | ||
| * Use this instead of `new TextDecoder()`. | ||
| * | ||
| * @param label - The encoding label (e.g., 'utf-8', 'utf-16'). Defaults to 'utf-8'. | ||
| * @param options - Optional TextDecoderOptions. | ||
| * @returns A new TextDecoder instance. | ||
| */ | ||
| const createTextDecoder = (label, options) => _Reflect$1.construct(_TextDecoder, [label, options]); | ||
| /** | ||
| * (Safe copy) Decodes a base64-encoded string. | ||
| * Use this instead of `atob()`. | ||
| * | ||
| * @param data - The base64-encoded string to decode. | ||
| * @returns The decoded string. | ||
| */ | ||
| const atob = (data) => _atob(data); | ||
| /** | ||
| * (Safe copy) Encodes a string to base64. | ||
| * Use this instead of `btoa()`. | ||
| * | ||
| * @param data - The string to encode. | ||
| * @returns The base64-encoded string. | ||
| */ | ||
| const btoa = (data) => _btoa(data); | ||
| const index_cjs_js = require('../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.cjs.js'); | ||
| const index_cjs_js$1 = require('../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.cjs.js'); | ||
| const index_cjs_js$2 = require('../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/string/index.cjs.js'); | ||
| const { arrayBufferToUtf8String } = require('../_shared/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string/index.cjs.js'); | ||
| const { urlSafeBase64ToBase64 } = require('../_shared/lib/utils/url-safe-base64-to-base64/index.cjs.js'); | ||
| const { base64ToUrlSafeBase64 } = require('../_shared/lib/utils/base64-to-url-safe-base64/index.cjs.js'); | ||
| const { uint8ArrayToUtf8String } = require('../_shared/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string/index.cjs.js'); | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Uint8ClampedArray = globalThis.Uint8ClampedArray; | ||
| const _Uint16Array = globalThis.Uint16Array; | ||
| const _Uint32Array = globalThis.Uint32Array; | ||
| const _Int8Array = globalThis.Int8Array; | ||
| const _Int16Array = globalThis.Int16Array; | ||
| const _Int32Array = globalThis.Int32Array; | ||
| const _Float32Array = globalThis.Float32Array; | ||
| const _Float64Array = globalThis.Float64Array; | ||
| const _BigInt64Array = globalThis.BigInt64Array; | ||
| const _BigUint64Array = globalThis.BigUint64Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from an array-like or iterable object. | ||
| */ | ||
| _Uint8Array.from.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from a variable number of arguments. | ||
| */ | ||
| _Uint8Array.of.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from an array-like or iterable object. | ||
| */ | ||
| _Uint8ClampedArray.from.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from a variable number of arguments. | ||
| */ | ||
| _Uint8ClampedArray.of.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from an array-like or iterable object. | ||
| */ | ||
| _Uint16Array.from.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from a variable number of arguments. | ||
| */ | ||
| _Uint16Array.of.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from an array-like or iterable object. | ||
| */ | ||
| _Uint32Array.from.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from a variable number of arguments. | ||
| */ | ||
| _Uint32Array.of.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from an array-like or iterable object. | ||
| */ | ||
| _Int8Array.from.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from a variable number of arguments. | ||
| */ | ||
| _Int8Array.of.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from an array-like or iterable object. | ||
| */ | ||
| _Int16Array.from.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from a variable number of arguments. | ||
| */ | ||
| _Int16Array.of.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from an array-like or iterable object. | ||
| */ | ||
| _Int32Array.from.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from a variable number of arguments. | ||
| */ | ||
| _Int32Array.of.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from an array-like or iterable object. | ||
| */ | ||
| _Float32Array.from.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from a variable number of arguments. | ||
| */ | ||
| _Float32Array.of.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from an array-like or iterable object. | ||
| */ | ||
| _Float64Array.from.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from a variable number of arguments. | ||
| */ | ||
| _Float64Array.of.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from an array-like or iterable object. | ||
| */ | ||
| _BigInt64Array.from.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from a variable number of arguments. | ||
| */ | ||
| _BigInt64Array.of.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from an array-like or iterable object. | ||
| */ | ||
| _BigUint64Array.from.bind(_BigUint64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from a variable number of arguments. | ||
| */ | ||
| _BigUint64Array.of.bind(_BigUint64Array); | ||
| createTextEncoder(); | ||
| const UTF8_DECODER = createTextDecoder('utf8'); | ||
| index_cjs_js.createTextEncoder(); | ||
| ({ | ||
| SIMPLE: { | ||
| ARRAY: createUint8Array([104, 101, 108, 108, 111]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([104, 101, 108, 108, 111]), | ||
| }, | ||
| NON_ASCII: { | ||
| ARRAY: createUint8Array([227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]), | ||
| }, | ||
| EMPTY: { | ||
| ARRAY: createUint8Array([]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([]), | ||
| }, | ||
@@ -188,20 +25,2 @@ }); | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| /** | ||
| * Converts a Latin-1 "binary string" to Uint8Array. | ||
@@ -221,3 +40,3 @@ * | ||
| function binaryStringToBytes(binaryStr) { | ||
| const bytes = createUint8Array(binaryStr.length); | ||
| const bytes = index_cjs_js$1.createUint8Array(binaryStr.length); | ||
| for (let i = 0; i < binaryStr.length; i += 1) { | ||
@@ -230,30 +49,2 @@ bytes[i] = binaryStr.charCodeAt(i); | ||
| /** | ||
| * Converts URL-safe base64 encoding back to standard base64 encoding. | ||
| * Restores standard characters and adds padding if needed. | ||
| * | ||
| * @param urlSafeBase64 - The URL-safe base64 encoded string to convert | ||
| * @returns The standard base64 encoded string with proper padding | ||
| * | ||
| * @example Without padding (common in JWT tokens) | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('SGVsbG8') | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example With URL-safe characters | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('a-b_c') | ||
| * // => 'a+b/c=' | ||
| * ``` | ||
| */ | ||
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (browser implementation). | ||
@@ -278,3 +69,3 @@ * Supports both standard and URL-safe base64 encoding. | ||
| function base64ToUint8Array(base64) { | ||
| return binaryStringToBytes(atob(urlSafeBase64ToBase64(base64))); | ||
| return binaryStringToBytes(index_cjs_js.atob(urlSafeBase64ToBase64(base64))); | ||
| } | ||
@@ -302,70 +93,6 @@ | ||
| function fromBase64(base64) { | ||
| return createTextDecoder().decode(binaryStringToBytes(atob(urlSafeBase64ToBase64(base64)))); | ||
| return index_cjs_js.createTextDecoder().decode(binaryStringToBytes(index_cjs_js.atob(urlSafeBase64ToBase64(base64)))); | ||
| } | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
| * Optionally removes padding characters for more compact representation. | ||
| * | ||
| * @param base64 - The standard base64 encoded string | ||
| * @param root0 - Configuration options | ||
| * @param root0.urlSafe - Whether to apply URL-safe transformations (+ → -, / → _) | ||
| * @param root0.keepPadding - Whether to preserve padding characters (=) | ||
| * @returns The URL-safe base64 encoded string | ||
| * | ||
| * @example URL-safe with padding | ||
| * ```typescript | ||
| * const urlSafe = base64ToUrlSafeBase64('a+b/c==', { urlSafe: true, keepPadding: true }) | ||
| * // => 'a-b_c==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (compact) | ||
| * ```typescript | ||
| * const compact = base64ToUrlSafeBase64('SGVsbG8=', { urlSafe: true, keepPadding: false }) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| /** | ||
| * Safe copies of String built-in static methods. | ||
| * | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/string | ||
| */ | ||
| const _String = globalThis.String; | ||
| /** | ||
| * (Safe copy) Returns a string created from the specified sequence of UTF-16 code units. | ||
| */ | ||
| const fromCharCode = _String.fromCharCode; | ||
| /** | ||
| * Converts a Uint8Array to a Latin-1 "binary string" where | ||
@@ -389,3 +116,3 @@ * each byte becomes a single charCode (0-255). | ||
| for (let i = 0; i < bytes.length; i += 1) { | ||
| binary += fromCharCode(bytes[i]); | ||
| binary += index_cjs_js$2.fromCharCode(bytes[i]); | ||
| } | ||
@@ -417,3 +144,3 @@ return binary; | ||
| function toBase64(text, urlSafe = false, keepPadding = false) { | ||
| return base64ToUrlSafeBase64(btoa(bytesToBinaryString(createTextEncoder().encode(text))), { urlSafe, keepPadding }); | ||
| return base64ToUrlSafeBase64(index_cjs_js.btoa(bytesToBinaryString(index_cjs_js.createTextEncoder().encode(text))), { urlSafe, keepPadding }); | ||
| } | ||
@@ -445,3 +172,3 @@ | ||
| function uint8ArrayToBase64(bytes, urlSafe = false, keepPadding = false) { | ||
| return base64ToUrlSafeBase64(btoa(bytesToBinaryString(bytes)), { | ||
| return base64ToUrlSafeBase64(index_cjs_js.btoa(bytesToBinaryString(bytes)), { | ||
| urlSafe, | ||
@@ -453,16 +180,15 @@ keepPadding, | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| function utf8StringToUint8Array(text) { | ||
| return index_cjs_js.createTextEncoder().encode(text); | ||
| } | ||
@@ -477,2 +203,1 @@ | ||
| exports.utf8StringToUint8Array = utf8StringToUint8Array; | ||
| //# sourceMappingURL=index.cjs.js.map |
+136
-8
@@ -1,8 +0,136 @@ | ||
| export { arrayBufferToUtf8String } from '../lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string'; | ||
| export { base64ToUint8Array } from '../lib/base64-to-uint8-array/browser/base64-to-uint8-array'; | ||
| export { fromBase64 } from '../lib/from-base64/browser/from-base64'; | ||
| export { utf8StringToUint8Array } from '../lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array'; | ||
| export { toBase64 } from '../lib/to-base64/browser/to-base64'; | ||
| export { uint8ArrayToBase64 } from '../lib/uint8-array-to-base64/browser/uint8-array-to-base64'; | ||
| export { uint8ArrayToUtf8String } from '../lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string'; | ||
| //# sourceMappingURL=index.d.ts.map | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| declare function arrayBufferToUtf8String(uint8Array: ArrayBuffer): string; | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (browser implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to convert | ||
| * @returns The decoded Uint8Array | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8=') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 (without padding) | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| */ | ||
| declare function base64ToUint8Array(base64: string): Uint8Array; | ||
| /** | ||
| * Decodes a base64 encoded string to a UTF-8 string (browser implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to decode | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const message = fromBase64('SGVsbG8sIFdvcmxkIQ==') | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 | ||
| * ```typescript | ||
| * const token = fromBase64('eyJ1c2VySWQiOjEyM30') | ||
| * // => '{"userId":123}' | ||
| * ``` | ||
| */ | ||
| declare function fromBase64(base64: string): string; | ||
| /** | ||
| * Encodes a UTF-8 string to base64 format (browser implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param text - The UTF-8 string to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const encoded = toBase64('Hello, World!') | ||
| * // => 'SGVsbG8sIFdvcmxkIQ==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (for URLs/tokens) | ||
| * ```typescript | ||
| * const token = toBase64('{"userId":123}', true, false) | ||
| * // => 'eyJ1c2VySWQiOjEyM30' | ||
| * ``` | ||
| */ | ||
| declare function toBase64(text: string, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| /** | ||
| * Converts a Uint8Array to a base64 encoded string (browser implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param bytes - The Uint8Array to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const encoded = uint8ArrayToBase64(bytes) | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const token = uint8ArrayToBase64(bytes, true, false) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| declare function uint8ArrayToBase64(bytes: Uint8Array, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * ``` | ||
| */ | ||
| declare function uint8ArrayToUtf8String(uint8Array: Uint8Array): string; | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| declare function utf8StringToUint8Array(text: string): Uint8Array; | ||
| export { arrayBufferToUtf8String, base64ToUint8Array, fromBase64, toBase64, uint8ArrayToBase64, uint8ArrayToUtf8String, utf8StringToUint8Array }; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../libs/utils/string/src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAA;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAA;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAA;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAA;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../libs/utils/string/src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAA;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAA;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAA;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAA"} |
+15
-290
@@ -1,173 +0,10 @@ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _atob = globalThis.atob; | ||
| const _btoa = globalThis.btoa; | ||
| const _Reflect$1 = globalThis.Reflect; | ||
| /** | ||
| * (Safe copy) Creates a new TextEncoder using the captured TextEncoder constructor. | ||
| * Use this instead of `new TextEncoder()`. | ||
| * | ||
| * @returns A new TextEncoder instance. | ||
| */ | ||
| const createTextEncoder = () => _Reflect$1.construct(_TextEncoder, []); | ||
| /** | ||
| * (Safe copy) Creates a new TextDecoder using the captured TextDecoder constructor. | ||
| * Use this instead of `new TextDecoder()`. | ||
| * | ||
| * @param label - The encoding label (e.g., 'utf-8', 'utf-16'). Defaults to 'utf-8'. | ||
| * @param options - Optional TextDecoderOptions. | ||
| * @returns A new TextDecoder instance. | ||
| */ | ||
| const createTextDecoder = (label, options) => _Reflect$1.construct(_TextDecoder, [label, options]); | ||
| /** | ||
| * (Safe copy) Decodes a base64-encoded string. | ||
| * Use this instead of `atob()`. | ||
| * | ||
| * @param data - The base64-encoded string to decode. | ||
| * @returns The decoded string. | ||
| */ | ||
| const atob = (data) => _atob(data); | ||
| /** | ||
| * (Safe copy) Encodes a string to base64. | ||
| * Use this instead of `btoa()`. | ||
| * | ||
| * @param data - The string to encode. | ||
| * @returns The base64-encoded string. | ||
| */ | ||
| const btoa = (data) => _btoa(data); | ||
| import { createTextEncoder, createTextDecoder, atob, btoa } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.esm.js'; | ||
| import { createUint8Array } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.esm.js'; | ||
| import { fromCharCode } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/string/index.esm.js'; | ||
| import { arrayBufferToUtf8String } from '../_shared/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string/index.esm.js'; | ||
| import { urlSafeBase64ToBase64 } from '../_shared/lib/utils/url-safe-base64-to-base64/index.esm.js'; | ||
| import { base64ToUrlSafeBase64 } from '../_shared/lib/utils/base64-to-url-safe-base64/index.esm.js'; | ||
| import { uint8ArrayToUtf8String } from '../_shared/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string/index.esm.js'; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Uint8ClampedArray = globalThis.Uint8ClampedArray; | ||
| const _Uint16Array = globalThis.Uint16Array; | ||
| const _Uint32Array = globalThis.Uint32Array; | ||
| const _Int8Array = globalThis.Int8Array; | ||
| const _Int16Array = globalThis.Int16Array; | ||
| const _Int32Array = globalThis.Int32Array; | ||
| const _Float32Array = globalThis.Float32Array; | ||
| const _Float64Array = globalThis.Float64Array; | ||
| const _BigInt64Array = globalThis.BigInt64Array; | ||
| const _BigUint64Array = globalThis.BigUint64Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from an array-like or iterable object. | ||
| */ | ||
| _Uint8Array.from.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from a variable number of arguments. | ||
| */ | ||
| _Uint8Array.of.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from an array-like or iterable object. | ||
| */ | ||
| _Uint8ClampedArray.from.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from a variable number of arguments. | ||
| */ | ||
| _Uint8ClampedArray.of.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from an array-like or iterable object. | ||
| */ | ||
| _Uint16Array.from.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from a variable number of arguments. | ||
| */ | ||
| _Uint16Array.of.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from an array-like or iterable object. | ||
| */ | ||
| _Uint32Array.from.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from a variable number of arguments. | ||
| */ | ||
| _Uint32Array.of.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from an array-like or iterable object. | ||
| */ | ||
| _Int8Array.from.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from a variable number of arguments. | ||
| */ | ||
| _Int8Array.of.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from an array-like or iterable object. | ||
| */ | ||
| _Int16Array.from.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from a variable number of arguments. | ||
| */ | ||
| _Int16Array.of.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from an array-like or iterable object. | ||
| */ | ||
| _Int32Array.from.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from a variable number of arguments. | ||
| */ | ||
| _Int32Array.of.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from an array-like or iterable object. | ||
| */ | ||
| _Float32Array.from.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from a variable number of arguments. | ||
| */ | ||
| _Float32Array.of.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from an array-like or iterable object. | ||
| */ | ||
| _Float64Array.from.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from a variable number of arguments. | ||
| */ | ||
| _Float64Array.of.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from an array-like or iterable object. | ||
| */ | ||
| _BigInt64Array.from.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from a variable number of arguments. | ||
| */ | ||
| _BigInt64Array.of.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from an array-like or iterable object. | ||
| */ | ||
| _BigUint64Array.from.bind(_BigUint64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from a variable number of arguments. | ||
| */ | ||
| _BigUint64Array.of.bind(_BigUint64Array); | ||
| createTextEncoder(); | ||
| const UTF8_DECODER = createTextDecoder('utf8'); | ||
| ({ | ||
@@ -186,20 +23,2 @@ SIMPLE: { | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| /** | ||
| * Converts a Latin-1 "binary string" to Uint8Array. | ||
@@ -227,30 +46,2 @@ * | ||
| /** | ||
| * Converts URL-safe base64 encoding back to standard base64 encoding. | ||
| * Restores standard characters and adds padding if needed. | ||
| * | ||
| * @param urlSafeBase64 - The URL-safe base64 encoded string to convert | ||
| * @returns The standard base64 encoded string with proper padding | ||
| * | ||
| * @example Without padding (common in JWT tokens) | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('SGVsbG8') | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example With URL-safe characters | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('a-b_c') | ||
| * // => 'a+b/c=' | ||
| * ``` | ||
| */ | ||
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (browser implementation). | ||
@@ -302,66 +93,2 @@ * Supports both standard and URL-safe base64 encoding. | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
| * Optionally removes padding characters for more compact representation. | ||
| * | ||
| * @param base64 - The standard base64 encoded string | ||
| * @param root0 - Configuration options | ||
| * @param root0.urlSafe - Whether to apply URL-safe transformations (+ → -, / → _) | ||
| * @param root0.keepPadding - Whether to preserve padding characters (=) | ||
| * @returns The URL-safe base64 encoded string | ||
| * | ||
| * @example URL-safe with padding | ||
| * ```typescript | ||
| * const urlSafe = base64ToUrlSafeBase64('a+b/c==', { urlSafe: true, keepPadding: true }) | ||
| * // => 'a-b_c==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (compact) | ||
| * ```typescript | ||
| * const compact = base64ToUrlSafeBase64('SGVsbG8=', { urlSafe: true, keepPadding: false }) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| /** | ||
| * Safe copies of String built-in static methods. | ||
| * | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/string | ||
| */ | ||
| const _String = globalThis.String; | ||
| /** | ||
| * (Safe copy) Returns a string created from the specified sequence of UTF-16 code units. | ||
| */ | ||
| const fromCharCode = _String.fromCharCode; | ||
| /** | ||
| * Converts a Uint8Array to a Latin-1 "binary string" where | ||
@@ -446,19 +173,17 @@ * each byte becomes a single charCode (0-255). | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| export { arrayBufferToUtf8String, base64ToUint8Array, fromBase64, toBase64, uint8ArrayToBase64, uint8ArrayToUtf8String, utf8StringToUint8Array }; | ||
| //# sourceMappingURL=index.esm.js.map |
+21
-30
| var HyperfrontendStringUtils = (function (exports) { | ||
| 'use strict'; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * Safe copies of encoding built-ins for TextEncoder, TextDecoder, atob, and btoa. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
@@ -52,12 +48,8 @@ const _TextDecoder = globalThis.TextDecoder; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * Safe TypedArray and ArrayBuffer factories for protected array construction. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
@@ -304,18 +296,2 @@ const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
@@ -342,3 +318,3 @@ * Optionally removes padding characters for more compact representation. | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding }) { | ||
| if (urlSafe) { | ||
@@ -465,2 +441,18 @@ base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| exports.arrayBufferToUtf8String = arrayBufferToUtf8String; | ||
@@ -477,2 +469,1 @@ exports.base64ToUint8Array = base64ToUint8Array; | ||
| })({}); | ||
| //# sourceMappingURL=index.iife.js.map |
| var HyperfrontendStringUtils=function(n){"use strict";const r=globalThis.TextEncoder,o=globalThis.TextDecoder,t=globalThis.atob,i=globalThis.btoa,e=globalThis.Reflect,l=()=>e.construct(r,[]),a=(n,r)=>e.construct(o,[n,r]),f=n=>t(n),b=n=>i(n),c=globalThis.ArrayBuffer,d=globalThis.SharedArrayBuffer,u=globalThis.Uint8Array,s=globalThis.Uint8ClampedArray,g=globalThis.Uint16Array,h=globalThis.Uint32Array,T=globalThis.Int8Array,A=globalThis.Int16Array,y=globalThis.Int32Array,m=globalThis.Float32Array,p=globalThis.Float64Array,U=globalThis.BigInt64Array,S=globalThis.BigUint64Array,B=globalThis.Reflect;function C(n,r,o){return"number"==typeof n?B.construct(u,[n]):n instanceof c||n instanceof d?B.construct(u,[n,r,o]):B.construct(u,[n])}u.from.bind(u),u.of.bind(u),s.from.bind(s),s.of.bind(s),g.from.bind(g),g.of.bind(g),h.from.bind(h),h.of.bind(h),T.from.bind(T),T.of.bind(T),A.from.bind(A),A.of.bind(A),y.from.bind(y),y.of.bind(y),m.from.bind(m),m.of.bind(m),p.from.bind(p),p.of.bind(p),U.from.bind(U),U.of.bind(U),S.from.bind(S),S.of.bind(S),l();const I=a("utf8");function k(n){const r=C(n.length);for(let o=0;o<n.length;o+=1)r[o]=n.charCodeAt(o);return r}function P(n){let r=n.replaceAll("-","+").replaceAll("_","/");const o=r.length%4;return o&&(r=r.padEnd(r.length+(4-o),"=")),r}function x(n,{urlSafe:r,keepPadding:o}){if(r&&(n=n.replaceAll("+","-").replaceAll("/","_"),!1===o))for(;n.endsWith("=");)n=n.slice(0,-1);return n}C([104,101,108,108,111]),C([227,129,147,227,130,147,227,129,171,227,129,161,227,129,175]),C([]);const E=globalThis.String.fromCharCode;function F(n){let r="";for(let o=0;o<n.length;o+=1)r+=E(n[o]);return r}return n.arrayBufferToUtf8String=function(n){return I.decode(n)},n.base64ToUint8Array=function(n){return k(f(P(n)))},n.fromBase64=function(n){return a().decode(k(f(P(n))))},n.toBase64=function(n,r=!1,o=!1){return x(b(F(l().encode(n))),{urlSafe:r,keepPadding:o})},n.uint8ArrayToBase64=function(n,r=!1,o=!1){return x(b(F(n)),{urlSafe:r,keepPadding:o})},n.uint8ArrayToUtf8String=function(n){return I.decode(n)},n.utf8StringToUint8Array=function(n){return l().encode(n)},n}({}); | ||
| //# sourceMappingURL=index.iife.min.js.map |
+21
-30
@@ -7,12 +7,8 @@ (function (global, factory) { | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * Safe copies of encoding built-ins for TextEncoder, TextDecoder, atob, and btoa. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
@@ -56,12 +52,8 @@ const _TextDecoder = globalThis.TextDecoder; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * Safe TypedArray and ArrayBuffer factories for protected array construction. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
@@ -308,18 +300,2 @@ const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
@@ -346,3 +322,3 @@ * Optionally removes padding characters for more compact representation. | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding }) { | ||
| if (urlSafe) { | ||
@@ -469,2 +445,18 @@ base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createTextEncoder().encode(text); | ||
| } | ||
| exports.arrayBufferToUtf8String = arrayBufferToUtf8String; | ||
@@ -479,2 +471,1 @@ exports.base64ToUint8Array = base64ToUint8Array; | ||
| })); | ||
| //# sourceMappingURL=index.umd.js.map |
| !function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).HyperfrontendStringUtils={})}(this,function(n){"use strict";const r=globalThis.TextEncoder,o=globalThis.TextDecoder,t=globalThis.atob,e=globalThis.btoa,i=globalThis.Reflect,l=()=>i.construct(r,[]),f=(n,r)=>i.construct(o,[n,r]),a=n=>t(n),d=n=>e(n),b=globalThis.ArrayBuffer,c=globalThis.SharedArrayBuffer,s=globalThis.Uint8Array,u=globalThis.Uint8ClampedArray,g=globalThis.Uint16Array,h=globalThis.Uint32Array,T=globalThis.Int8Array,y=globalThis.Int16Array,A=globalThis.Int32Array,p=globalThis.Float32Array,m=globalThis.Float64Array,U=globalThis.BigInt64Array,S=globalThis.BigUint64Array,B=globalThis.Reflect;function x(n,r,o){return"number"==typeof n?B.construct(s,[n]):n instanceof b||n instanceof c?B.construct(s,[n,r,o]):B.construct(s,[n])}s.from.bind(s),s.of.bind(s),u.from.bind(u),u.of.bind(u),g.from.bind(g),g.of.bind(g),h.from.bind(h),h.of.bind(h),T.from.bind(T),T.of.bind(T),y.from.bind(y),y.of.bind(y),A.from.bind(A),A.of.bind(A),p.from.bind(p),p.of.bind(p),m.from.bind(m),m.of.bind(m),U.from.bind(U),U.of.bind(U),S.from.bind(S),S.of.bind(S),l();const C=f("utf8");function I(n){const r=x(n.length);for(let o=0;o<n.length;o+=1)r[o]=n.charCodeAt(o);return r}function k(n){let r=n.replaceAll("-","+").replaceAll("_","/");const o=r.length%4;return o&&(r=r.padEnd(r.length+(4-o),"=")),r}function P(n,{urlSafe:r,keepPadding:o}){if(r&&(n=n.replaceAll("+","-").replaceAll("/","_"),!1===o))for(;n.endsWith("=");)n=n.slice(0,-1);return n}x([104,101,108,108,111]),x([227,129,147,227,130,147,227,129,171,227,129,161,227,129,175]),x([]);const E=globalThis.String.fromCharCode;function F(n){let r="";for(let o=0;o<n.length;o+=1)r+=E(n[o]);return r}n.arrayBufferToUtf8String=function(n){return C.decode(n)},n.base64ToUint8Array=function(n){return I(a(k(n)))},n.fromBase64=function(n){return f().decode(I(a(k(n))))},n.toBase64=function(n,r=!1,o=!1){return P(d(F(l().encode(n))),{urlSafe:r,keepPadding:o})},n.uint8ArrayToBase64=function(n,r=!1,o=!1){return P(d(F(n)),{urlSafe:r,keepPadding:o})},n.uint8ArrayToUtf8String=function(n){return C.decode(n)},n.utf8StringToUint8Array=function(n){return l().encode(n)}}); | ||
| //# sourceMappingURL=index.umd.min.js.map |
+6
-0
@@ -5,2 +5,8 @@ # Changelog | ||
| ## [0.1.1](https://github.com/AndrewRedican/hyperfrontend/compare/a0ce00788db9fe1c2b1acf06dd59b2622cb1ed3f...466c0388c4cd516b9c704214140b4df1004098e6) - 2026-06-23 | ||
| ### Other | ||
| - **@hyperfrontend/workspace:** remove lib-builder and tool-package as implicit dependencies for all lib projects | ||
| ## [0.1.0](https://github.com/AndrewRedican/hyperfrontend/compare/c8db08be8b183addd26caf81fdd17fb3693f296f...8a05c80832de91cd61f8af064b417870ea1e3b01) - 2026-04-13 | ||
@@ -7,0 +13,0 @@ |
+19
-263
| 'use strict'; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _Reflect$1 = globalThis.Reflect; | ||
| /** | ||
| * (Safe copy) Creates a new TextEncoder using the captured TextEncoder constructor. | ||
| * Use this instead of `new TextEncoder()`. | ||
| * | ||
| * @returns A new TextEncoder instance. | ||
| */ | ||
| const createTextEncoder = () => _Reflect$1.construct(_TextEncoder, []); | ||
| /** | ||
| * (Safe copy) Creates a new TextDecoder using the captured TextDecoder constructor. | ||
| * Use this instead of `new TextDecoder()`. | ||
| * | ||
| * @param label - The encoding label (e.g., 'utf-8', 'utf-16'). Defaults to 'utf-8'. | ||
| * @param options - Optional TextDecoderOptions. | ||
| * @returns A new TextDecoder instance. | ||
| */ | ||
| const createTextDecoder = (label, options) => _Reflect$1.construct(_TextDecoder, [label, options]); | ||
| const index_cjs_js = require('../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.cjs.js'); | ||
| const index_cjs_js$1 = require('../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.cjs.js'); | ||
| const { arrayBufferToUtf8String } = require('../_shared/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string/index.cjs.js'); | ||
| const { urlSafeBase64ToBase64 } = require('../_shared/lib/utils/url-safe-base64-to-base64/index.cjs.js'); | ||
| const { base64ToUrlSafeBase64 } = require('../_shared/lib/utils/base64-to-url-safe-base64/index.cjs.js'); | ||
| const { uint8ArrayToUtf8String } = require('../_shared/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string/index.cjs.js'); | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Uint8ClampedArray = globalThis.Uint8ClampedArray; | ||
| const _Uint16Array = globalThis.Uint16Array; | ||
| const _Uint32Array = globalThis.Uint32Array; | ||
| const _Int8Array = globalThis.Int8Array; | ||
| const _Int16Array = globalThis.Int16Array; | ||
| const _Int32Array = globalThis.Int32Array; | ||
| const _Float32Array = globalThis.Float32Array; | ||
| const _Float64Array = globalThis.Float64Array; | ||
| const _BigInt64Array = globalThis.BigInt64Array; | ||
| const _BigUint64Array = globalThis.BigUint64Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from an array-like or iterable object. | ||
| */ | ||
| _Uint8Array.from.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from a variable number of arguments. | ||
| */ | ||
| _Uint8Array.of.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from an array-like or iterable object. | ||
| */ | ||
| _Uint8ClampedArray.from.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from a variable number of arguments. | ||
| */ | ||
| _Uint8ClampedArray.of.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from an array-like or iterable object. | ||
| */ | ||
| _Uint16Array.from.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from a variable number of arguments. | ||
| */ | ||
| _Uint16Array.of.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from an array-like or iterable object. | ||
| */ | ||
| _Uint32Array.from.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from a variable number of arguments. | ||
| */ | ||
| _Uint32Array.of.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from an array-like or iterable object. | ||
| */ | ||
| _Int8Array.from.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from a variable number of arguments. | ||
| */ | ||
| _Int8Array.of.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from an array-like or iterable object. | ||
| */ | ||
| _Int16Array.from.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from a variable number of arguments. | ||
| */ | ||
| _Int16Array.of.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from an array-like or iterable object. | ||
| */ | ||
| _Int32Array.from.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from a variable number of arguments. | ||
| */ | ||
| _Int32Array.of.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from an array-like or iterable object. | ||
| */ | ||
| _Float32Array.from.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from a variable number of arguments. | ||
| */ | ||
| _Float32Array.of.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from an array-like or iterable object. | ||
| */ | ||
| _Float64Array.from.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from a variable number of arguments. | ||
| */ | ||
| _Float64Array.of.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from an array-like or iterable object. | ||
| */ | ||
| _BigInt64Array.from.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from a variable number of arguments. | ||
| */ | ||
| _BigInt64Array.of.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from an array-like or iterable object. | ||
| */ | ||
| _BigUint64Array.from.bind(_BigUint64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from a variable number of arguments. | ||
| */ | ||
| _BigUint64Array.of.bind(_BigUint64Array); | ||
| createTextEncoder(); | ||
| const UTF8_DECODER = createTextDecoder('utf8'); | ||
| index_cjs_js.createTextEncoder(); | ||
| ({ | ||
| SIMPLE: { | ||
| ARRAY: createUint8Array([104, 101, 108, 108, 111]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([104, 101, 108, 108, 111]), | ||
| }, | ||
| NON_ASCII: { | ||
| ARRAY: createUint8Array([227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]), | ||
| }, | ||
| EMPTY: { | ||
| ARRAY: createUint8Array([]), | ||
| ARRAY: index_cjs_js$1.createUint8Array([]), | ||
| }, | ||
@@ -170,48 +24,2 @@ }); | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| /** | ||
| * Converts URL-safe base64 encoding back to standard base64 encoding. | ||
| * Restores standard characters and adds padding if needed. | ||
| * | ||
| * @param urlSafeBase64 - The URL-safe base64 encoded string to convert | ||
| * @returns The standard base64 encoded string with proper padding | ||
| * | ||
| * @example Without padding (common in JWT tokens) | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('SGVsbG8') | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example With URL-safe characters | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('a-b_c') | ||
| * // => 'a+b/c=' | ||
| * ``` | ||
| */ | ||
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (Node.js implementation). | ||
@@ -237,3 +45,3 @@ * Supports both standard and URL-safe base64 encoding. | ||
| const buffer = Buffer.from(urlSafeBase64ToBase64(base64), 'base64'); | ||
| return createUint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); | ||
| return index_cjs_js$1.createUint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); | ||
| } | ||
@@ -265,52 +73,2 @@ | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createUint8Array(Buffer.from(text, 'utf8')); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
| * Optionally removes padding characters for more compact representation. | ||
| * | ||
| * @param base64 - The standard base64 encoded string | ||
| * @param root0 - Configuration options | ||
| * @param root0.urlSafe - Whether to apply URL-safe transformations (+ → -, / → _) | ||
| * @param root0.keepPadding - Whether to preserve padding characters (=) | ||
| * @returns The URL-safe base64 encoded string | ||
| * | ||
| * @example URL-safe with padding | ||
| * ```typescript | ||
| * const urlSafe = base64ToUrlSafeBase64('a+b/c==', { urlSafe: true, keepPadding: true }) | ||
| * // => 'a-b_c==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (compact) | ||
| * ```typescript | ||
| * const compact = base64ToUrlSafeBase64('SGVsbG8=', { urlSafe: true, keepPadding: false }) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| /** | ||
| * Encodes a UTF-8 string to base64 format (Node.js implementation). | ||
@@ -371,16 +129,15 @@ * Supports optional URL-safe encoding and padding control. | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| function utf8StringToUint8Array(text) { | ||
| return index_cjs_js$1.createUint8Array(Buffer.from(text, 'utf8')); | ||
| } | ||
@@ -395,2 +152,1 @@ | ||
| exports.utf8StringToUint8Array = utf8StringToUint8Array; | ||
| //# sourceMappingURL=index.cjs.js.map |
+136
-8
@@ -1,8 +0,136 @@ | ||
| export { arrayBufferToUtf8String } from '../lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string'; | ||
| export { base64ToUint8Array } from '../lib/base64-to-uint8-array/node/base64-to-uint8-array'; | ||
| export { fromBase64 } from '../lib/from-base64/node/from-base64'; | ||
| export { utf8StringToUint8Array } from '../lib/utf8-string-to-uint8-array/node/utf8-string-to-uint8-array'; | ||
| export { toBase64 } from '../lib/to-base64/node/to-base64'; | ||
| export { uint8ArrayToBase64 } from '../lib/uint8-array-to-base64/node/uint8-array-to-base64'; | ||
| export { uint8ArrayToUtf8String } from '../lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string'; | ||
| //# sourceMappingURL=index.d.ts.map | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| declare function arrayBufferToUtf8String(uint8Array: ArrayBuffer): string; | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (Node.js implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to convert | ||
| * @returns The decoded Uint8Array | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8=') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 (without padding) | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| */ | ||
| declare function base64ToUint8Array(base64: string): Uint8Array; | ||
| /** | ||
| * Decodes a base64 encoded string to a UTF-8 string (Node.js implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param text - The base64 encoded string to decode | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const message = fromBase64('SGVsbG8sIFdvcmxkIQ==') | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 | ||
| * ```typescript | ||
| * const token = fromBase64('eyJ1c2VySWQiOjEyM30') | ||
| * // => '{"userId":123}' | ||
| * ``` | ||
| */ | ||
| declare function fromBase64(text: string): string; | ||
| /** | ||
| * Encodes a UTF-8 string to base64 format (Node.js implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param text - The UTF-8 string to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const encoded = toBase64('Hello, World!') | ||
| * // => 'SGVsbG8sIFdvcmxkIQ==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (for URLs/tokens) | ||
| * ```typescript | ||
| * const token = toBase64('{"userId":123}', true, false) | ||
| * // => 'eyJ1c2VySWQiOjEyM30' | ||
| * ``` | ||
| */ | ||
| declare function toBase64(text: string, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| /** | ||
| * Converts a Uint8Array to a base64 encoded string (Node.js implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param bytes - The Uint8Array to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const encoded = uint8ArrayToBase64(bytes) | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const token = uint8ArrayToBase64(bytes, true, false) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| declare function uint8ArrayToBase64(bytes: Uint8Array, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * ``` | ||
| */ | ||
| declare function uint8ArrayToUtf8String(uint8Array: Uint8Array): string; | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| declare function utf8StringToUint8Array(text: string): Uint8Array; | ||
| export { arrayBufferToUtf8String, base64ToUint8Array, fromBase64, toBase64, uint8ArrayToBase64, uint8ArrayToUtf8String, utf8StringToUint8Array }; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../libs/utils/string/src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAA;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAA;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mEAAmE,CAAA;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAA;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../libs/utils/string/src/node/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAA;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAA;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAA;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,mEAAmE,CAAA"} |
+14
-258
@@ -1,155 +0,9 @@ | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of encoding built-ins via factory functions. | ||
| * | ||
| * Provides safe references to TextEncoder, TextDecoder, atob, and btoa. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/encoding | ||
| */ | ||
| const _TextEncoder = globalThis.TextEncoder; | ||
| const _TextDecoder = globalThis.TextDecoder; | ||
| const _Reflect$1 = globalThis.Reflect; | ||
| /** | ||
| * (Safe copy) Creates a new TextEncoder using the captured TextEncoder constructor. | ||
| * Use this instead of `new TextEncoder()`. | ||
| * | ||
| * @returns A new TextEncoder instance. | ||
| */ | ||
| const createTextEncoder = () => _Reflect$1.construct(_TextEncoder, []); | ||
| /** | ||
| * (Safe copy) Creates a new TextDecoder using the captured TextDecoder constructor. | ||
| * Use this instead of `new TextDecoder()`. | ||
| * | ||
| * @param label - The encoding label (e.g., 'utf-8', 'utf-16'). Defaults to 'utf-8'. | ||
| * @param options - Optional TextDecoderOptions. | ||
| * @returns A new TextDecoder instance. | ||
| */ | ||
| const createTextDecoder = (label, options) => _Reflect$1.construct(_TextDecoder, [label, options]); | ||
| import { createTextEncoder, createTextDecoder } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/encoding/index.esm.js'; | ||
| import { createUint8Array } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.esm.js'; | ||
| import { arrayBufferToUtf8String } from '../_shared/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string/index.esm.js'; | ||
| import { urlSafeBase64ToBase64 } from '../_shared/lib/utils/url-safe-base64-to-base64/index.esm.js'; | ||
| import { base64ToUrlSafeBase64 } from '../_shared/lib/utils/base64-to-url-safe-base64/index.esm.js'; | ||
| import { uint8ArrayToUtf8String } from '../_shared/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string/index.esm.js'; | ||
| /* eslint-disable workspace/lib-require-jsdoc-example */ | ||
| /** | ||
| * Safe copies of TypedArray and ArrayBuffer built-ins via factory functions. | ||
| * | ||
| * Provides safe references to Uint8Array, Int8Array, ArrayBuffer, DataView, etc. | ||
| * These references are captured at module initialization time to protect against | ||
| * prototype pollution attacks. Import only what you need for tree-shaking. | ||
| * | ||
| * @module @hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays | ||
| */ | ||
| const _ArrayBuffer = globalThis.ArrayBuffer; | ||
| const _SharedArrayBuffer = globalThis.SharedArrayBuffer; | ||
| const _Uint8Array = globalThis.Uint8Array; | ||
| const _Uint8ClampedArray = globalThis.Uint8ClampedArray; | ||
| const _Uint16Array = globalThis.Uint16Array; | ||
| const _Uint32Array = globalThis.Uint32Array; | ||
| const _Int8Array = globalThis.Int8Array; | ||
| const _Int16Array = globalThis.Int16Array; | ||
| const _Int32Array = globalThis.Int32Array; | ||
| const _Float32Array = globalThis.Float32Array; | ||
| const _Float64Array = globalThis.Float64Array; | ||
| const _BigInt64Array = globalThis.BigInt64Array; | ||
| const _BigUint64Array = globalThis.BigUint64Array; | ||
| const _Reflect = globalThis.Reflect; | ||
| function createUint8Array(arg, byteOffset, length) { | ||
| if (typeof arg === 'number') { | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| if (arg instanceof _ArrayBuffer || arg instanceof _SharedArrayBuffer) { | ||
| return _Reflect.construct(_Uint8Array, [arg, byteOffset, length]); | ||
| } | ||
| return _Reflect.construct(_Uint8Array, [arg]); | ||
| } | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from an array-like or iterable object. | ||
| */ | ||
| _Uint8Array.from.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8Array from a variable number of arguments. | ||
| */ | ||
| _Uint8Array.of.bind(_Uint8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from an array-like or iterable object. | ||
| */ | ||
| _Uint8ClampedArray.from.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint8ClampedArray from a variable number of arguments. | ||
| */ | ||
| _Uint8ClampedArray.of.bind(_Uint8ClampedArray); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from an array-like or iterable object. | ||
| */ | ||
| _Uint16Array.from.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint16Array from a variable number of arguments. | ||
| */ | ||
| _Uint16Array.of.bind(_Uint16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from an array-like or iterable object. | ||
| */ | ||
| _Uint32Array.from.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Uint32Array from a variable number of arguments. | ||
| */ | ||
| _Uint32Array.of.bind(_Uint32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from an array-like or iterable object. | ||
| */ | ||
| _Int8Array.from.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int8Array from a variable number of arguments. | ||
| */ | ||
| _Int8Array.of.bind(_Int8Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from an array-like or iterable object. | ||
| */ | ||
| _Int16Array.from.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int16Array from a variable number of arguments. | ||
| */ | ||
| _Int16Array.of.bind(_Int16Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from an array-like or iterable object. | ||
| */ | ||
| _Int32Array.from.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Int32Array from a variable number of arguments. | ||
| */ | ||
| _Int32Array.of.bind(_Int32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from an array-like or iterable object. | ||
| */ | ||
| _Float32Array.from.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float32Array from a variable number of arguments. | ||
| */ | ||
| _Float32Array.of.bind(_Float32Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from an array-like or iterable object. | ||
| */ | ||
| _Float64Array.from.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new Float64Array from a variable number of arguments. | ||
| */ | ||
| _Float64Array.of.bind(_Float64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from an array-like or iterable object. | ||
| */ | ||
| _BigInt64Array.from.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigInt64Array from a variable number of arguments. | ||
| */ | ||
| _BigInt64Array.of.bind(_BigInt64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from an array-like or iterable object. | ||
| */ | ||
| _BigUint64Array.from.bind(_BigUint64Array); | ||
| /** | ||
| * (Safe copy) Creates a new BigUint64Array from a variable number of arguments. | ||
| */ | ||
| _BigUint64Array.of.bind(_BigUint64Array); | ||
| createTextEncoder(); | ||
| const UTF8_DECODER = createTextDecoder('utf8'); | ||
| ({ | ||
@@ -168,48 +22,2 @@ SIMPLE: { | ||
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| function arrayBufferToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| } | ||
| /** | ||
| * Converts URL-safe base64 encoding back to standard base64 encoding. | ||
| * Restores standard characters and adds padding if needed. | ||
| * | ||
| * @param urlSafeBase64 - The URL-safe base64 encoded string to convert | ||
| * @returns The standard base64 encoded string with proper padding | ||
| * | ||
| * @example Without padding (common in JWT tokens) | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('SGVsbG8') | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example With URL-safe characters | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('a-b_c') | ||
| * // => 'a+b/c=' | ||
| * ``` | ||
| */ | ||
| function urlSafeBase64ToBase64(urlSafeBase64) { | ||
| let normalizedBase64 = urlSafeBase64.replaceAll('-', '+').replaceAll('_', '/'); | ||
| const pad = normalizedBase64.length % 4; | ||
| if (pad) { | ||
| normalizedBase64 = normalizedBase64.padEnd(normalizedBase64.length + (4 - pad), '='); | ||
| } | ||
| return normalizedBase64; | ||
| } | ||
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (Node.js implementation). | ||
@@ -262,52 +70,2 @@ * Supports both standard and URL-safe base64 encoding. | ||
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function utf8StringToUint8Array(text) { | ||
| return createUint8Array(Buffer.from(text, 'utf8')); | ||
| } | ||
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
| * Optionally removes padding characters for more compact representation. | ||
| * | ||
| * @param base64 - The standard base64 encoded string | ||
| * @param root0 - Configuration options | ||
| * @param root0.urlSafe - Whether to apply URL-safe transformations (+ → -, / → _) | ||
| * @param root0.keepPadding - Whether to preserve padding characters (=) | ||
| * @returns The URL-safe base64 encoded string | ||
| * | ||
| * @example URL-safe with padding | ||
| * ```typescript | ||
| * const urlSafe = base64ToUrlSafeBase64('a+b/c==', { urlSafe: true, keepPadding: true }) | ||
| * // => 'a-b_c==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (compact) | ||
| * ```typescript | ||
| * const compact = base64ToUrlSafeBase64('SGVsbG8=', { urlSafe: true, keepPadding: false }) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| function base64ToUrlSafeBase64(base64, { urlSafe, keepPadding, }) { | ||
| if (urlSafe) { | ||
| base64 = base64.replaceAll('+', '-').replaceAll('/', '_'); | ||
| if (keepPadding === false) { | ||
| while (base64.endsWith('=')) { | ||
| base64 = base64.slice(0, -1); | ||
| } | ||
| } | ||
| } | ||
| return base64; | ||
| } | ||
| /** | ||
| * Encodes a UTF-8 string to base64 format (Node.js implementation). | ||
@@ -368,19 +126,17 @@ * Supports optional URL-safe encoding and padding control. | ||
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| function uint8ArrayToUtf8String(uint8Array) { | ||
| return UTF8_DECODER.decode(uint8Array); | ||
| function utf8StringToUint8Array(text) { | ||
| return createUint8Array(Buffer.from(text, 'utf8')); | ||
| } | ||
| export { arrayBufferToUtf8String, base64ToUint8Array, fromBase64, toBase64, uint8ArrayToBase64, uint8ArrayToUtf8String, utf8StringToUint8Array }; | ||
| //# sourceMappingURL=index.esm.js.map |
+12
-7
| { | ||
| "name": "@hyperfrontend/string-utils", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Isomorphic string encoding utilities with unified APIs for browser and Node.js environments.", | ||
@@ -40,6 +40,2 @@ "license": "MIT", | ||
| "require": "./node/index.cjs.js" | ||
| }, | ||
| "./bundle": { | ||
| "import": "./bundle/index.iife.min.js", | ||
| "require": "./bundle/index.iife.min.js" | ||
| } | ||
@@ -60,3 +56,12 @@ }, | ||
| "unpkg": "./bundle/index.umd.min.js", | ||
| "jsdelivr": "./bundle/index.umd.min.js" | ||
| } | ||
| "jsdelivr": "./bundle/index.umd.min.js", | ||
| "files": [ | ||
| "**/index.*", | ||
| "**/index.d.ts", | ||
| "CHANGELOG.md", | ||
| "LICENSE.md", | ||
| "README.md", | ||
| "SECURITY.md", | ||
| "!**/*.js.map" | ||
| ] | ||
| } |
| {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":";;AAAA;AAC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AC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AACrH;;ACvBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,SAAU,kBAAkB,CAAC,KAAiB,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;IACxF,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE;QAC7D,OAAO;QACP,WAAW;AACZ,KAAA,CAAC;AACJ;;AC9BA;;;;;;;;;;;;AAYG;AACG,SAAU,sBAAsB,CAAC,UAAsB,EAAA;AAC3D,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;AACxC;;;;;;;;;;"} |
| {"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":"AAAA;AACA;;;;;;;;AAQG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;AAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;AAC7B,MAAMA,UAAQ,GAAG,UAAU,CAAC,OAAO;AAGnC;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,MAAgCA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;AAErG;;;;;;;AAOG;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,OAA4B,KAC/DA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAEjE;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;AAEzD;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;;ACrDzD;AACA;;;;;;;;AAQG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;AAEvD,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;AACvD,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS;AACvC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAA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;AACA,IAAA,OAAO,MAAM;AACf;;ACpBA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,QAAQ,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;IACzE,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AACrH;;ACvBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,SAAU,kBAAkB,CAAC,KAAiB,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;IACxF,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE;QAC7D,OAAO;QACP,WAAW;AACZ,KAAA,CAAC;AACJ;;AC9BA;;;;;;;;;;;;AAYG;AACG,SAAU,sBAAsB,CAAC,UAAsB,EAAA;AAC3D,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;AACxC;;;;"} |
| {"version":3,"file":"index.iife.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":";;;IAAA;IACA;;;;;;;;IAQG;IAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;IAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;IAC7B,MAAMA,UAAQ,GAAG,UAAU,CAAC,OAAO;IAGnC;;;;;IAKG;IACI,MAAM,iBAAiB,GAAG,MAAgCA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;IAErG;;;;;;;IAOG;IACI,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,OAA4B,KAC/DA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEjE;;;;;;IAMG;IACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;IAEzD;;;;;;IAMG;IACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;;ICrDzD;IACA;;;;;;;;IAQG;IAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;IAEvD,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;IACzC,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB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AAG,EAAE;IACf,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YACxC,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClC;IACA,IAAA,OAAO,MAAM;IACf;;ICpBA;;;;;;;;;;;;;;;;;;;;IAoBG;IACG,SAAU,QAAQ,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;QACzE,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IACrH;;ICvBA;;;;;;;;;;;;;;;;;;;;;;IAsBG;IACG,SAAU,kBAAkB,CAAC,KAAiB,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;QACxF,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE;YAC7D,OAAO;YACP,WAAW;IACZ,KAAA,CAAC;IACJ;;IC9BA;;;;;;;;;;;;IAYG;IACG,SAAU,sBAAsB,CAAC,UAAsB,EAAA;IAC3D,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;IACxC;;;;;;;;;;;;;;;;"} |
| {"version":3,"file":"index.iife.min.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_TextEncoder","globalThis","TextEncoder","_TextDecoder","TextDecoder","_atob","atob","_btoa","btoa","_Reflect","Reflect","createTextEncoder","construct","createTextDecoder","label","options","data","_ArrayBuffer","ArrayBuffer","_SharedArrayBuffer","SharedArrayBuffer","_Uint8Array","Uint8Array","_Uint8ClampedArray","Uint8ClampedArray","_Uint16Array","Uint16Array","_Uint32Array","Uint32Array","_Int8Array","Int8Array","_Int16Array","Int16Array","_Int32Array","Int32Array","_Float32Array","Float32Array","_Float64Array","Float64Array","_BigInt64Array","BigInt64Array","_BigUint64Array","BigUint64Array","createUint8Array","arg","byteOffset","length","from","bind","of","UTF8_DECODER","binaryStringToBytes","binaryStr","bytes","i","charCodeAt","urlSafeBase64ToBase64","urlSafeBase64","normalizedBase64","replaceAll","pad","padEnd","base64ToUrlSafeBase64","base64","urlSafe","keepPadding","endsWith","slice","fromCharCode","String","bytesToBinaryString","binary","uint8Array","decode","text","encode"],"mappings":"sDAWA,MAAMA,EAAeC,WAAWC,YAC1BC,EAAeF,WAAWG,YAC1BC,EAAQJ,WAAWK,KACnBC,EAAQN,WAAWO,KACnBC,EA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,EAAauB,OAAOD,EAC7B,uBCKM,SAA6BT,GACjC,OAAOZ,EAAoB7C,EAAKkD,EAAsBO,IACxD,eCFM,SAAqBA,GACzB,OAAOlD,IAAoB4D,OAAOtB,EAAoB7C,EAAKkD,EAAsBO,KACnF,aCAM,SAAmBW,EAAcV,GAAU,EAAOC,GAAc,GACpE,OAAOH,EAAsBtD,EAAK8D,EAAoB3D,IAAoBgE,OAAOD,KAAS,CAAEV,UAASC,eACvG,uBCAM,SAA6BZ,EAAmBW,GAAU,EAAOC,GAAc,GACnF,OAAOH,EAAsBtD,EAAK8D,EAAoBjB,IAAS,CAC7DW,UACAC,eAEJ,2BCjBM,SAAiCO,GACrC,OAAOtB,EAAauB,OAAOD,EAC7B,2BCHM,SAAiCE,GACrC,OAAO/D,IAAoBgE,OAAOD,EACpC"} |
| {"version":3,"file":"index.umd.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":";;;;;;IAAA;IACA;;;;;;;;IAQG;IAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;IAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI;IAC7B,MAAMA,UAAQ,GAAG,UAAU,CAAC,OAAO;IAGnC;;;;;IAKG;IACI,MAAM,iBAAiB,GAAG,MAAgCA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;IAErG;;;;;;;IAOG;IACI,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,OAA4B,KAC/DA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEjE;;;;;;IAMG;IACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;IAEzD;;;;;;IAMG;IACI,MAAM,IAAI,GAAG,CAAC,IAAY,KAAa,KAAK,CAAC,IAAI,CAAC;;ICrDzD;IACA;;;;;;;;IAQG;IAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;IAEvD,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;IACzC,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;IACvD,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;IAC3C,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS;IACvC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;IACzC,MAAM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;IACA,IAAA,OAAO,MAAM;IACf;;ICpBA;;;;;;;;;;;;;;;;;;;;IAoBG;IACG,SAAU,QAAQ,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;QACzE,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IACrH;;ICvBA;;;;;;;;;;;;;;;;;;;;;;IAsBG;IACG,SAAU,kBAAkB,CAAC,KAAiB,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;QACxF,OAAO,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE;YAC7D,OAAO;YACP,WAAW;IACZ,KAAA,CAAC;IACJ;;IC9BA;;;;;;;;;;;;IAYG;IACG,SAAU,sBAAsB,CAAC,UAAsB,EAAA;IAC3D,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;IACxC;;;;;;;;;;;;;;"} |
| {"version":3,"file":"index.umd.min.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/string/index.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_TextEncoder","globalThis","TextEncoder","_TextDecoder","TextDecoder","_atob","atob","_btoa","btoa","_Reflect","Reflect","createTextEncoder","construct","createTextDecoder","label","options","data","_ArrayBuffer","ArrayBuffer","_SharedArrayBuffer","SharedArrayBuffer","_Uint8Array","Uint8Array","_Uint8ClampedArray","Uint8ClampedArray","_Uint16Array","Uint16Array","_Uint32Array","Uint32Array","_Int8Array","Int8Array","_Int16Array","Int16Array","_Int32Array","Int32Array","_Float32Array","Float32Array","_Float64Array","Float64Array","_BigInt64Array","BigInt64Array","_BigUint64Array","BigUint64Array","createUint8Array","arg","byteOffset","length","from","bind","of","UTF8_DECODER","binaryStringToBytes","binaryStr","bytes","i","charCodeAt","urlSafeBase64ToBase64","urlSafeBase64","normalizedBase64","replaceAll","pad","padEnd","base64ToUrlSafeBase64","base64","urlSafe","keepPadding","endsWith","slice","fromCharCode","String","bytesToBinaryString","binary","uint8Array","decode","text","encode"],"mappings":"+PAWA,MAAMA,EAAeC,WAAWC,YAC1BC,EAAeF,WAAWG,YAC1BC,EAAQJ,WAAWK,KACnBC,EAAQN,WAAWO,KACnBC,EAAWR,WAAWS,QASfC,EAAoB,IAAgCF,EAASG,UAAUZ,EAAc,IAUrFa,EAAoB,CAACC,EAAgBC,IACnCN,EAASG,UAAUT,EAAc,CAACW,EAAOC,IAS3CT,EAAQU,GAAyBX,EAAMW,GASvCR,EAAQQ,GAAyBT,EAAMS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,GAAU,EAAOC,GAAc,GACpE,OAAOH,EAAsBtD,EAAK8D,EAAoB3D,IAAoBgE,OAAOD,KAAS,CAAEV,UAASC,eACvG,uBCAM,SAA6BZ,EAAmBW,GAAU,EAAOC,GAAc,GACnF,OAAOH,EAAsBtD,EAAK8D,EAAoBjB,IAAS,CAC7DW,UACAC,eAEJ,2BCjBM,SAAiCO,GACrC,OAAOtB,EAAauB,OAAOD,EAC7B,2BCHM,SAAiCE,GACrC,OAAO/D,IAAoBgE,OAAOD,EACpC"} |
| /** | ||
| * Converts an ArrayBuffer to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The ArrayBuffer to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting ArrayBuffer to string | ||
| * ```typescript | ||
| * const encoder = new TextEncoder() | ||
| * const buffer = encoder.encode('Hello, World!').buffer | ||
| * const decoded = arrayBufferToUtf8String(buffer) | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| */ | ||
| export declare function arrayBufferToUtf8String(uint8Array: ArrayBuffer): string; | ||
| //# sourceMappingURL=array-buffer-to-utf8-string.d.ts.map |
| {"version":3,"file":"array-buffer-to-utf8-string.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,CAEvE"} |
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (browser implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to convert | ||
| * @returns The decoded Uint8Array | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8=') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 (without padding) | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| */ | ||
| export declare function base64ToUint8Array(base64: string): Uint8Array; | ||
| //# sourceMappingURL=base64-to-uint8-array.d.ts.map |
| {"version":3,"file":"base64-to-uint8-array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/browser/base64-to-uint8-array.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAE7D"} |
| /** | ||
| * Converts a base64 encoded string to a Uint8Array (Node.js implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to convert | ||
| * @returns The decoded Uint8Array | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8=') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 (without padding) | ||
| * ```typescript | ||
| * const bytes = base64ToUint8Array('SGVsbG8') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) // 'Hello' | ||
| * ``` | ||
| */ | ||
| export declare function base64ToUint8Array(base64: string): Uint8Array; | ||
| //# sourceMappingURL=base64-to-uint8-array.d.ts.map |
| {"version":3,"file":"base64-to-uint8-array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/node/base64-to-uint8-array.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAG7D"} |
| /** | ||
| * Decodes a base64 encoded string to a UTF-8 string (browser implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param base64 - The base64 encoded string to decode | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const message = fromBase64('SGVsbG8sIFdvcmxkIQ==') | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 | ||
| * ```typescript | ||
| * const token = fromBase64('eyJ1c2VySWQiOjEyM30') | ||
| * // => '{"userId":123}' | ||
| * ``` | ||
| */ | ||
| export declare function fromBase64(base64: string): string; | ||
| //# sourceMappingURL=from-base64.d.ts.map |
| {"version":3,"file":"from-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/from-base64/browser/from-base64.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD"} |
| /** | ||
| * Decodes a base64 encoded string to a UTF-8 string (Node.js implementation). | ||
| * Supports both standard and URL-safe base64 encoding. | ||
| * | ||
| * @param text - The base64 encoded string to decode | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const message = fromBase64('SGVsbG8sIFdvcmxkIQ==') | ||
| * // => 'Hello, World!' | ||
| * ``` | ||
| * | ||
| * @example URL-safe base64 | ||
| * ```typescript | ||
| * const token = fromBase64('eyJ1c2VySWQiOjEyM30') | ||
| * // => '{"userId":123}' | ||
| * ``` | ||
| */ | ||
| export declare function fromBase64(text: string): string; | ||
| //# sourceMappingURL=from-base64.d.ts.map |
| {"version":3,"file":"from-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/from-base64/node/from-base64.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C"} |
| export declare const ENCODER: TextEncoder; | ||
| export declare const UTF8_DECODER: TextDecoder; | ||
| export declare const BASE_64_ENCODING_SAMPLES: { | ||
| readonly SIMPLE: { | ||
| readonly DECODED: "Hello, World!"; | ||
| readonly ENCODED: "SGVsbG8sIFdvcmxkIQ=="; | ||
| readonly ENCODED_NO_PADDING: "SGVsbG8sIFdvcmxkIQ"; | ||
| }; | ||
| readonly NON_ASCII: { | ||
| readonly DECODED: "こんにちは"; | ||
| readonly ENCODED: "44GT44KT44Gr44Gh44Gv"; | ||
| }; | ||
| readonly EMPTY: { | ||
| readonly DECODED: ""; | ||
| readonly ENCODED: ""; | ||
| }; | ||
| }; | ||
| export declare const UINT8_CONVERTION_SAMPLES: { | ||
| readonly SIMPLE: { | ||
| readonly STRING: "hello"; | ||
| readonly ARRAY: Uint8Array<ArrayBufferLike>; | ||
| }; | ||
| readonly NON_ASCII: { | ||
| readonly STRING: "こんにちは"; | ||
| readonly ARRAY: Uint8Array<ArrayBufferLike>; | ||
| }; | ||
| readonly EMPTY: { | ||
| readonly STRING: ""; | ||
| readonly ARRAY: Uint8Array<ArrayBufferLike>; | ||
| }; | ||
| }; | ||
| //# sourceMappingURL=shared-consts.d.ts.map |
| {"version":3,"file":"shared-consts.d.ts","sourceRoot":"","sources":["../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,aAAsB,CAAA;AAC1C,eAAO,MAAM,YAAY,aAA4B,CAAA;AAErD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAcpC,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;CAapC,CAAA"} |
| /** | ||
| * Encodes a UTF-8 string to base64 format (browser implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param text - The UTF-8 string to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const encoded = toBase64('Hello, World!') | ||
| * // => 'SGVsbG8sIFdvcmxkIQ==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (for URLs/tokens) | ||
| * ```typescript | ||
| * const token = toBase64('{"userId":123}', true, false) | ||
| * // => 'eyJ1c2VySWQiOjEyM30' | ||
| * ``` | ||
| */ | ||
| export declare function toBase64(text: string, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| //# sourceMappingURL=to-base64.d.ts.map |
| {"version":3,"file":"to-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/to-base64/browser/to-base64.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,UAAQ,EAAE,WAAW,UAAQ,GAAG,MAAM,CAEnF"} |
| /** | ||
| * Encodes a UTF-8 string to base64 format (Node.js implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param text - The UTF-8 string to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const encoded = toBase64('Hello, World!') | ||
| * // => 'SGVsbG8sIFdvcmxkIQ==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (for URLs/tokens) | ||
| * ```typescript | ||
| * const token = toBase64('{"userId":123}', true, false) | ||
| * // => 'eyJ1c2VySWQiOjEyM30' | ||
| * ``` | ||
| */ | ||
| export declare function toBase64(text: string, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| //# sourceMappingURL=to-base64.d.ts.map |
| {"version":3,"file":"to-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/to-base64/node/to-base64.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,UAAQ,EAAE,WAAW,UAAQ,GAAG,MAAM,CAKnF"} |
| /** | ||
| * Converts a Uint8Array to a base64 encoded string (browser implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param bytes - The Uint8Array to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const encoded = uint8ArrayToBase64(bytes) | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const token = uint8ArrayToBase64(bytes, true, false) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| export declare function uint8ArrayToBase64(bytes: Uint8Array, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| //# sourceMappingURL=uint8-array-to-base64.d.ts.map |
| {"version":3,"file":"uint8-array-to-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/browser/uint8-array-to-base64.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,UAAQ,EAAE,WAAW,UAAQ,GAAG,MAAM,CAKlG"} |
| /** | ||
| * Converts a Uint8Array to a base64 encoded string (Node.js implementation). | ||
| * Supports optional URL-safe encoding and padding control. | ||
| * | ||
| * @param bytes - The Uint8Array to encode | ||
| * @param urlSafe - Whether to use URL-safe base64 encoding (replaces + and / with - and _) | ||
| * @param keepPadding - Whether to keep padding characters (=) in the output | ||
| * @returns The base64 encoded string | ||
| * | ||
| * @example Standard base64 | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const encoded = uint8ArrayToBase64(bytes) | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const token = uint8ArrayToBase64(bytes, true, false) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| export declare function uint8ArrayToBase64(bytes: Uint8Array, urlSafe?: boolean, keepPadding?: boolean): string; | ||
| //# sourceMappingURL=uint8-array-to-base64.d.ts.map |
| {"version":3,"file":"uint8-array-to-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/node/uint8-array-to-base64.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,UAAQ,EAAE,WAAW,UAAQ,GAAG,MAAM,CAElG"} |
| /** | ||
| * Converts a Uint8Array to a UTF-8 encoded string. | ||
| * | ||
| * @param uint8Array - The Uint8Array to convert | ||
| * @returns The decoded UTF-8 string | ||
| * | ||
| * @example Converting Uint8Array to string | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const text = uint8ArrayToUtf8String(bytes) | ||
| * // => 'Hello' | ||
| * ``` | ||
| */ | ||
| export declare function uint8ArrayToUtf8String(uint8Array: Uint8Array): string; | ||
| //# sourceMappingURL=uint8-array-to-utf8-string.d.ts.map |
| {"version":3,"file":"uint8-array-to-utf8-string.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAErE"} |
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (browser implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (browser) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| export declare function utf8StringToUint8Array(text: string): Uint8Array; | ||
| //# sourceMappingURL=utf8-string-to-uint8-array.d.ts.map |
| {"version":3,"file":"utf8-string-to-uint8-array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/browser/utf8-string-to-uint8-array.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAE/D"} |
| /** | ||
| * Converts a UTF-8 string to a Uint8Array (Node.js implementation). | ||
| * | ||
| * @param text - The UTF-8 string to convert | ||
| * @returns The encoded Uint8Array | ||
| * | ||
| * @example Encoding string to bytes (Node.js) | ||
| * ```typescript | ||
| * const bytes = utf8StringToUint8Array('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| export declare function utf8StringToUint8Array(text: string): Uint8Array; | ||
| //# sourceMappingURL=utf8-string-to-uint8-array.d.ts.map |
| {"version":3,"file":"utf8-string-to-uint8-array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/node/utf8-string-to-uint8-array.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAE/D"} |
| /** | ||
| * Converts standard base64 encoding to URL-safe base64 encoding. | ||
| * Optionally removes padding characters for more compact representation. | ||
| * | ||
| * @param base64 - The standard base64 encoded string | ||
| * @param root0 - Configuration options | ||
| * @param root0.urlSafe - Whether to apply URL-safe transformations (+ → -, / → _) | ||
| * @param root0.keepPadding - Whether to preserve padding characters (=) | ||
| * @returns The URL-safe base64 encoded string | ||
| * | ||
| * @example URL-safe with padding | ||
| * ```typescript | ||
| * const urlSafe = base64ToUrlSafeBase64('a+b/c==', { urlSafe: true, keepPadding: true }) | ||
| * // => 'a-b_c==' | ||
| * ``` | ||
| * | ||
| * @example URL-safe without padding (compact) | ||
| * ```typescript | ||
| * const compact = base64ToUrlSafeBase64('SGVsbG8=', { urlSafe: true, keepPadding: false }) | ||
| * // => 'SGVsbG8' | ||
| * ``` | ||
| */ | ||
| export declare function base64ToUrlSafeBase64(base64: string, { urlSafe, keepPadding, }: { | ||
| /** Whether to apply URL-safe transformations */ urlSafe: boolean; | ||
| /** Whether to preserve padding characters */ keepPadding: boolean; | ||
| }): string; | ||
| //# sourceMappingURL=base64-to-url-safe-base64.d.ts.map |
| {"version":3,"file":"base64-to-url-safe-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,EACE,OAAO,EACP,WAAW,GACZ,EAAE;IACD,gDAAgD,CAAC,OAAO,EAAE,OAAO,CAAA;IACjE,6CAA6C,CAAC,WAAW,EAAE,OAAO,CAAA;CACnE,GACA,MAAM,CAUR"} |
| /** | ||
| * Converts a Latin-1 "binary string" to Uint8Array. | ||
| * | ||
| * Truncates code units above 255 (U+0100+). Not unicode-safe. | ||
| * | ||
| * @param binaryStr - The Latin-1 binary string to convert | ||
| * @returns A Uint8Array containing the byte values from the string | ||
| * | ||
| * @example Converting binary string to bytes | ||
| * ```typescript | ||
| * const bytes = binaryStringToBytes('Hello') | ||
| * // => Uint8Array([72, 101, 108, 108, 111]) | ||
| * ``` | ||
| */ | ||
| export declare function binaryStringToBytes(binaryStr: string): Uint8Array<ArrayBufferLike>; | ||
| //# sourceMappingURL=binary-string-to-bytes.d.ts.map |
| {"version":3,"file":"binary-string-to-bytes.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/utils/binary-string-to-bytes.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,+BAMpD"} |
| /** | ||
| * Converts a Uint8Array to a Latin-1 "binary string" where | ||
| * each byte becomes a single charCode (0-255). | ||
| * | ||
| * Use only for binary <-> base64 interop in browsers. | ||
| * | ||
| * @param bytes - The Uint8Array to convert | ||
| * @returns A Latin-1 binary string representation | ||
| * | ||
| * @example Converting bytes to binary string | ||
| * ```typescript | ||
| * const bytes = new Uint8Array([72, 101, 108, 108, 111]) | ||
| * const binaryStr = bytesToBinaryString(bytes) | ||
| * // => 'Hello' | ||
| * ``` | ||
| */ | ||
| export declare function bytesToBinaryString(bytes: Uint8Array): string; | ||
| //# sourceMappingURL=bytes-to-binary-string.d.ts.map |
| {"version":3,"file":"bytes-to-binary-string.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/utils/bytes-to-binary-string.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAM7D"} |
| /** | ||
| * Converts URL-safe base64 encoding back to standard base64 encoding. | ||
| * Restores standard characters and adds padding if needed. | ||
| * | ||
| * @param urlSafeBase64 - The URL-safe base64 encoded string to convert | ||
| * @returns The standard base64 encoded string with proper padding | ||
| * | ||
| * @example Without padding (common in JWT tokens) | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('SGVsbG8') | ||
| * // => 'SGVsbG8=' | ||
| * ``` | ||
| * | ||
| * @example With URL-safe characters | ||
| * ```typescript | ||
| * const standard = urlSafeBase64ToBase64('a-b_c') | ||
| * // => 'a+b/c=' | ||
| * ``` | ||
| */ | ||
| export declare function urlSafeBase64ToBase64(urlSafeBase64: string): string; | ||
| //# sourceMappingURL=url-safe-base64-to-base64.d.ts.map |
| {"version":3,"file":"url-safe-base64-to-base64.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAOnE"} |
| {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/node/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/node/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/node/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/node/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/node/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":";;AAAA;AACA;;;;;;;;AAQG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAG3C,MAAMA,UAAQ,GAAG,UAAU,CAAC,OAAO;AAGnC;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,MAAgCA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,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AACG,SAAU,QAAQ,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;AACzE,IAAA,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACzE,OAAO;QACP,WAAW;AACZ,KAAA,CAAC;AACJ;;AC1BA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,SAAU,kBAAkB,CAAC,KAAiB,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,EAAA;AACxF,IAAA,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAC1I;;ACzBA;;;;;;;;;;;;AAYG;AACG,SAAU,sBAAsB,CAAC,UAAsB,EAAA;AAC3D,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;AACxC;;;;;;;;;;"} |
| {"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/encoding/index.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/typed-arrays/index.ts","../../../../../../../../../../libs/utils/string/src/lib/shared-consts.ts","../../../../../../../../../../libs/utils/string/src/lib/array-buffer-to-utf8-string/array-buffer-to-utf8-string.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/url-safe-base64-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/base64-to-uint8-array/node/base64-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/from-base64/node/from-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/utf8-string-to-uint8-array/node/utf8-string-to-uint8-array.ts","../../../../../../../../../../libs/utils/string/src/lib/utils/base64-to-url-safe-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/to-base64/node/to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-base64/node/uint8-array-to-base64.ts","../../../../../../../../../../libs/utils/string/src/lib/uint8-array-to-utf8-string/uint8-array-to-utf8-string.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null],"names":["_Reflect"],"mappings":"AAAA;AACA;;;;;;;;AAQG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAG3C,MAAMA,UAAQ,GAAG,UAAU,CAAC,OAAO;AAGnC;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,MAAgCA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;AAErG;;;;;;;AAOG;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,OAA4B,KAC/DA,UAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;;ACnCjE;AACA;;;;;;;;AAQG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;AAEvD,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB;AACvD,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS;AACvC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY;AAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY;AAC7C,MAAM,cAAc,GAAG,UAAU,CAAC,aAAa;AAC/C,MAAM,eAAe,GAAG,UAAU,CAAC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