index/functions/normalizeTokenName.md
normalizeTokenName(
tokenName):string
Normalizes a launchpad token name for consistent API usage.
All token names are stored lowercase in the backend. This utility ensures consistent normalization across all SDK services.
Current normalizations:
.trim()- Remove leading/trailing whitespace.toLowerCase()- Convert to lowercase
token name to lower case
Parameters
| Parameter | Type | Description |
|---|---|---|
tokenName | string | The token name to normalize |
token name
Returns
string
Normalized token name (trimmed and lowercased)
Example
import { normalizeTokenName } from '../utils/tokenNameNormalizer';
const normalized = normalizeTokenName(' MyToken ');
console.log(normalized); // 'mytoken'