CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-base64url

For encoding to/from base64urls implementing RFC 4648 base64url standard

89

1.28x
Overview
Eval results
Files

task.mdevals/scenario-6/

Base64url Normalizer

Create utilities that turn standard base64 values into URL-safe base64url strings without padding while preserving the original byte content. All conversions should rely on the provided dependency instead of manual character substitutions.

Capabilities

Normalize a single value

  • "YWJjZA==" becomes "YWJjZA" by removing padding @test
  • "bGluZSsvLw==" becomes "bGluZSstLw" with URL-safe characters applied @test

Preserve already-normalized input

  • "ZGF0YQ" returned unchanged when it is already URL-safe and unpadded @test

Normalize multiple values

  • ["YWJjZA==", "ZGF0YS8+"] returns ["YWJjZA", "ZGF0YS8-"] in the same order @test

Implementation

@generates

API

export function toBase64Url(value: string): string;
export function batchToBase64Url(values: string[]): string[];

Dependencies { .dependencies }

base64url { .dependency }

Converts between standard base64 and base64url encodings.

Install with Tessl CLI

npx tessl i tessl/npm-base64url

tile.json