Function: getCookie

getCookie(name): string | null

获取 cookie

Parameters

Name Type Description
name string cookie名称

Returns

string | null

  • cookie值,不存在时返回null

Example

const token = getCookie('token');
ON THIS PAGE