MCPcopy
hub / github.com/vuejs/core / isTrueFalseValue

Function isTrueFalseValue

packages/compiler-ssr/src/transforms/ssrTransformElement.ts:404–415  ·  view source on GitHub ↗
(prop: DirectiveNode | AttributeNode)

Source from the content-addressed store, hash-verified

402}
403
404function isTrueFalseValue(prop: DirectiveNode | AttributeNode) {
405 if (prop.type === NodeTypes.DIRECTIVE) {
406 return (
407 prop.name === 'bind' &&
408 prop.arg &&
409 isStaticExp(prop.arg) &&
410 (prop.arg.content === 'true-value' || prop.arg.content === 'false-value')
411 )
412 } else {
413 return prop.name === 'true-value' || prop.name === 'false-value'
414 }
415}
416
417function isTextareaWithValue(
418 node: PlainElementNode,

Callers 1

ssrTransformElementFunction · 0.85

Calls 1

isStaticExpFunction · 0.85

Tested by

no test coverage detected