MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / isTrue

Function isTrue

web/packages/shared/util/check.ts:11–16  ·  view source on GitHub ↗
(value: any, strict = false)

Source from the content-addressed store, hash-verified

9 * @returns 返回boolean
10 */
11export const isTrue = (value: any, strict = false) => {
12 if (typeof value === 'string' && !strict) {
13 return value.toLowerCase() === 'true';
14 }
15 return value === true;
16};

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected