MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / _deserializeValue

Function _deserializeValue

contextKeyExpr/src/contextkey.ts:185–202  ·  view source on GitHub ↗
(serializedValue: string, strict: boolean)

Source from the content-addressed store, hash-verified

183 }
184
185 private static _deserializeValue(serializedValue: string, strict: boolean): any {
186 serializedValue = serializedValue.trim();
187
188 if (serializedValue === 'true') {
189 return true;
190 }
191
192 if (serializedValue === 'false') {
193 return false;
194 }
195
196 let m = /^'([^']*)'$/.exec(serializedValue);
197 if (m) {
198 return m[1].trim();
199 }
200
201 return serializedValue;
202 }
203
204 private static _deserializeRegexValue(serializedValue: string, strict: boolean): RegExp | null {
205

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected