[{"data":1,"prerenderedAt":247},["ShallowReactive",2],{"content-en-\u002Fsyntax\u002Fmethods":3},{"id":4,"title":5,"body":6,"description":240,"extension":241,"meta":242,"navigation":92,"path":243,"seo":244,"stem":245,"__hash__":246},"content_en\u002Fsyntax\u002Fmethods.md","Methods",{"type":7,"value":8,"toc":234},"minimark",[9,13,34,39,46,100,103,112,115,124,128,141,172,176,188,197,200,204,224,230],[10,11,5],"h1",{"id":12},"methods",[14,15,16,17,21,22,25,26,29,30,33],"p",{},"Method calls in ",[18,19,20],"code",{},"&#123;&#123; &#125;&#125;"," and ",[18,23,24],{},"@hg"," expressions are restricted to a small whitelist. Arbitrary chaining (",[18,27,28],{},".map",", ",[18,31,32],{},".trim",", etc.) is not allowed.",[35,36,38],"h2",{"id":37},"tolocalestring","toLocaleString",[14,40,41,42,45],{},"The only permitted method is ",[18,43,44],{},".toLocaleString(...)",". Arguments follow JavaScript conventions — the library does not validate them.",[47,48,53],"pre",{"className":49,"code":50,"language":51,"meta":52,"style":52},"language-markdown shiki shiki-themes github-light github-dark","\u003C!--\n@hg\nconst population = 2825000\n@endhg\n-->\n\nPopulation: {{ population.toLocaleString('en-US') }}\n","markdown","",[18,54,55,63,69,75,81,87,94],{"__ignoreMap":52},[56,57,60],"span",{"class":58,"line":59},"line",1,[56,61,62],{},"\u003C!--\n",[56,64,66],{"class":58,"line":65},2,[56,67,68],{},"@hg\n",[56,70,72],{"class":58,"line":71},3,[56,73,74],{},"const population = 2825000\n",[56,76,78],{"class":58,"line":77},4,[56,79,80],{},"@endhg\n",[56,82,84],{"class":58,"line":83},5,[56,85,86],{},"-->\n",[56,88,90],{"class":58,"line":89},6,[56,91,93],{"emptyLinePlaceholder":92},true,"\n",[56,95,97],{"class":58,"line":96},7,[56,98,99],{},"Population: {{ population.toLocaleString('en-US') }}\n",[14,101,102],{},"Output:",[47,104,106],{"className":49,"code":105,"language":51,"meta":52,"style":52},"Population: 2,825,000\n",[18,107,108],{"__ignoreMap":52},[56,109,110],{"class":58,"line":59},[56,111,105],{},[14,113,114],{},"Works on component props too:",[47,116,118],{"className":49,"code":117,"language":51,"meta":52,"style":52},"{{ population.toLocaleString('ja-JP') }}\n",[18,119,120],{"__ignoreMap":52},[56,121,122],{"class":58,"line":59},[56,123,117],{},[35,125,127],{"id":126},"template-literals","Template literals",[14,129,130,133,134,137,138,140],{},[18,131,132],{},".toLocaleString"," is also allowed inside ",[18,135,136],{},"`${…}`"," in ",[18,139,24],{}," blocks:",[47,142,144],{"className":49,"code":143,"language":51,"meta":52,"style":52},"\u003C!--\n@hg\nconst n = 1000\nconst label = `count: ${n.toLocaleString()}`\n@endhg\n-->\n",[18,145,146,150,154,159,164,168],{"__ignoreMap":52},[56,147,148],{"class":58,"line":59},[56,149,62],{},[56,151,152],{"class":58,"line":65},[56,153,68],{},[56,155,156],{"class":58,"line":71},[56,157,158],{},"const n = 1000\n",[56,160,161],{"class":58,"line":77},[56,162,163],{},"const label = `count: ${n.toLocaleString()}`\n",[56,165,166],{"class":58,"line":83},[56,167,80],{},[56,169,170],{"class":58,"line":89},[56,171,86],{},[35,173,175],{"id":174},"function-calls","Function calls",[14,177,178,179,183,184,187],{},"The only callable functions are ",[180,181,182],"strong",{},"registered components"," (",[18,185,186],{},"component … as name","):",[47,189,191],{"className":49,"code":190,"language":51,"meta":52,"style":52},"{{ cityItem({ city: \"Osaka\", population: 2825000 }) }}\n",[18,192,193],{"__ignoreMap":52},[56,194,195],{"class":58,"line":59},[56,196,190],{},[14,198,199],{},"There are no built-in functions in v0.10.0.",[35,201,203],{"id":202},"not-allowed","Not allowed",[47,205,207],{"className":49,"code":206,"language":51,"meta":52,"style":52},"{{ items.map(x => x.name) }}   \u003C!-- parse_error -->\n{{ text.trim() }}              \u003C!-- parse_error -->\n{{ Math.max(a, b) }}           \u003C!-- parse_error -->\n",[18,208,209,214,219],{"__ignoreMap":52},[56,210,211],{"class":58,"line":59},[56,212,213],{},"{{ items.map(x => x.name) }}   \u003C!-- parse_error -->\n",[56,215,216],{"class":58,"line":65},[56,217,218],{},"{{ text.trim() }}              \u003C!-- parse_error -->\n",[56,220,221],{"class":58,"line":71},[56,222,223],{},"{{ Math.max(a, b) }}           \u003C!-- parse_error -->\n",[14,225,226,227,229],{},"Use ",[18,228,24],{}," declarations or component templates to prepare values instead.",[231,232,233],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":52,"searchDepth":65,"depth":65,"links":235},[236,237,238,239],{"id":37,"depth":65,"text":38},{"id":126,"depth":65,"text":127},{"id":174,"depth":65,"text":175},{"id":202,"depth":65,"text":203},"Allowed method calls in hyogen.md expressions.","md",{},"\u002Fsyntax\u002Fmethods",{"title":5,"description":240},"syntax\u002Fmethods","V-7SrBM6oOD_Qq93gwWthFag9rRlswC8AmXyg7bGGGs",1787223114865]