Skip to content

@gala-chain/testAPI


API > randomize

Function: randomize()

randomize(str): string

Generates a randomized string by appending a random suffix to the input.

Parameters

str: string

Base string to randomize

Returns

Randomized string with the base string and random characters, limited to 30 characters

Example

const randomCollection = randomize("MyNFT"); // "MyNFTabc123xyz"
const randomUser = randomize("testuser"); // "testuserdef456uvw"

Source

chain-test/src/e2e/tokenOps.ts:53