(shapeArr, rootParticle = new Particle())
| 17777 | return obj |
| 17778 | } |
| 17779 | static fromShape(shapeArr, rootParticle = new Particle()) { |
| 17780 | const part = shapeArr.shift() |
| 17781 | if (part !== undefined) { |
| 17782 | for (let index = 0; index < part; index++) { |
| 17783 | rootParticle.appendLine(index.toString()) |
| 17784 | } |
| 17785 | } |
| 17786 | if (shapeArr.length) rootParticle.forEach(particle => Particle.fromShape(shapeArr.slice(0), particle)) |
| 17787 | return rootParticle |
| 17788 | } |
| 17789 | static fromDataTable(table) { |
| 17790 | const header = table.shift() |
| 17791 | return new Particle(table.map(row => this._zipObject(header, row))) |
nothing calls this directly
no test coverage detected