chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* @name base64Validate
* @summary Validates a base64 value.
* @description
* Validates that the supplied value is valid base64
*/
export declare const base64Validate: (value?: unknown, ipfsCompat?: boolean) => value is string;
/**
* @name isBase64
* @description Checks if the input is in base64, returning true/false
*/
export declare const isBase64: (value?: unknown, ipfsCompat?: boolean) => value is string;
/**
* @name base64Decode
* @summary Decodes a base64 value.
* @description
* From the provided input, decode the base64 and return the result as an `Uint8Array`.
*/
export declare const base64Decode: (value: string, ipfsCompat?: boolean) => Uint8Array;
/**
* @name base64Encode
* @summary Creates a base64 value.
* @description
* From the provided input, create the base64 and return the result as a string.
*/
export declare const base64Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
+34
View File
@@ -0,0 +1,34 @@
import { base64 } from '@scure/base';
import { createDecode, createEncode, createIs, createValidate } from '../base32/helpers.js';
const config = {
chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
coder: base64,
type: 'base64',
withPadding: true
};
/**
* @name base64Validate
* @summary Validates a base64 value.
* @description
* Validates that the supplied value is valid base64
*/
export const base64Validate = /*#__PURE__*/ createValidate(config);
/**
* @name isBase64
* @description Checks if the input is in base64, returning true/false
*/
export const isBase64 = /*#__PURE__*/ createIs(base64Validate);
/**
* @name base64Decode
* @summary Decodes a base64 value.
* @description
* From the provided input, decode the base64 and return the result as an `Uint8Array`.
*/
export const base64Decode = /*#__PURE__*/ createDecode(config, base64Validate);
/**
* @name base64Encode
* @summary Creates a base64 value.
* @description
* From the provided input, create the base64 and return the result as a string.
*/
export const base64Encode = /*#__PURE__*/ createEncode(config);
+6
View File
@@ -0,0 +1,6 @@
/**
* @summary Encode and decode base64 values
*/
export { base64Decode, base64Encode, base64Validate, isBase64 } from './bs64.js';
export { base64Pad } from './pad.js';
export { base64Trim } from './trim.js';
+6
View File
@@ -0,0 +1,6 @@
/**
* @summary Encode and decode base64 values
*/
export { base64Decode, base64Encode, base64Validate, isBase64 } from './bs64.js';
export { base64Pad } from './pad.js';
export { base64Trim } from './trim.js';
+5
View File
@@ -0,0 +1,5 @@
/**
* @name base64Pad
* @description Adds padding characters for correct length
*/
export declare function base64Pad(value: string): string;
+7
View File
@@ -0,0 +1,7 @@
/**
* @name base64Pad
* @description Adds padding characters for correct length
*/
export function base64Pad(value) {
return value.padEnd(value.length + (value.length % 4), '=');
}
+5
View File
@@ -0,0 +1,5 @@
/**
* @name base64Trim
* @description Trims padding characters
*/
export declare function base64Trim(value: string): string;
+10
View File
@@ -0,0 +1,10 @@
/**
* @name base64Trim
* @description Trims padding characters
*/
export function base64Trim(value) {
while (value.length && value.endsWith('=')) {
value = value.slice(0, -1);
}
return value;
}