Skip to main content
function encode
encode(string: string): string
Deprecated

The punycode.encode() method converts a string of Unicode codepoints to a Punycode string of ASCII-only characters.

punycode.encode('mañana'); // 'maana-pta'
punycode.encode('☃-⌘'); // '--dqo34k'

Parameters

string: string

Return Type

string
Back to top