MCPcopy Index your code
hub / github.com/angular/angular / getToken

Method getToken

packages/common/http/src/xsrf.ts:65–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 parseCount: number = 0;
64
65 getToken(): string | null {
66 if (typeof ngServerMode !== 'undefined' && ngServerMode) {
67 return null;
68 }
69 const cookieString = this.doc.cookie || '';
70 if (cookieString !== this.lastCookieString) {
71 this.parseCount++;
72 this.lastToken = parseCookieValue(cookieString, this.cookieName);
73 this.lastCookieString = cookieString;
74 }
75 return this.lastToken;
76 }
77}
78
79/**

Callers 1

xsrfInterceptorFnFunction · 0.45

Calls 1

parseCookieValueFunction · 0.85

Tested by

no test coverage detected