(globPath)
| 16233 | return this._getParticlesByGlobPath(query) |
| 16234 | } |
| 16235 | _getParticlesByGlobPath(globPath) { |
| 16236 | const edgeSymbol = this.edgeSymbol |
| 16237 | if (!globPath.includes(edgeSymbol)) { |
| 16238 | if (globPath === "*") return this.getSubparticles() |
| 16239 | return this.filter(particle => particle.cue === globPath) |
| 16240 | } |
| 16241 | const parts = globPath.split(edgeSymbol) |
| 16242 | const current = parts.shift() |
| 16243 | const rest = parts.join(edgeSymbol) |
| 16244 | const matchingParticles = current === "*" ? this.getSubparticles() : this.filter(subparticle => subparticle.cue === current) |
| 16245 | return [].concat.apply( |
| 16246 | [], |
| 16247 | matchingParticles.map(particle => particle._getParticlesByGlobPath(rest)) |
| 16248 | ) |
| 16249 | } |
| 16250 | _getParticleByPath(cuePath) { |
| 16251 | const edgeSymbol = this.edgeSymbol |
| 16252 | if (!cuePath.includes(edgeSymbol)) { |
no test coverage detected