Return an array of all variables, each as an array of properties/segments.
(template: string | Template[], options: StaticAnalysisOptions = {})
| 165 | |
| 166 | /** Return an array of all variables, each as an array of properties/segments. */ |
| 167 | public async variableSegments (template: string | Template[], options: StaticAnalysisOptions = {}): Promise<Array<SegmentArray>> { |
| 168 | const analysis = await analyze(isString(template) ? this.parse(template) : template, options) |
| 169 | return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a) => a.map((v) => v.toArray())))) |
| 170 | } |
| 171 | |
| 172 | /** Return an array of all variables, each as an array of properties/segments. */ |
| 173 | public variableSegmentsSync (template: string | Template[], options: StaticAnalysisOptions = {}): Array<SegmentArray> { |
no test coverage detected