(cuePath)
| 16154 | return JSON.stringify(this.asGrid, null, 2) |
| 16155 | } |
| 16156 | findParticles(cuePath) { |
| 16157 | // todo: can easily speed this up |
| 16158 | const map = {} |
| 16159 | if (!Array.isArray(cuePath)) cuePath = [cuePath] |
| 16160 | cuePath.forEach(path => (map[path] = true)) |
| 16161 | return this.topDownArray.filter(particle => { |
| 16162 | if (map[particle._getCuePath(this)]) return true |
| 16163 | return false |
| 16164 | }) |
| 16165 | } |
| 16166 | evalTemplateString(str) { |
| 16167 | const that = this |
| 16168 | return str.replace(/{([^\}]+)}/g, (match, path) => that.get(path) || "") |
no test coverage detected