* Return properties string from array
(params)
| 306 | * Return properties string from array |
| 307 | */ |
| 308 | stringify(params) { |
| 309 | if (params.length === 0) { |
| 310 | return '' |
| 311 | } |
| 312 | let nodes = [] |
| 313 | for (let param of params) { |
| 314 | if (param[param.length - 1].type !== 'div') { |
| 315 | param.push(this.div(params)) |
| 316 | } |
| 317 | nodes.push(...param) |
| 318 | } |
| 319 | if (nodes[0].type === 'div') { |
| 320 | nodes = nodes.slice(1) |
| 321 | } |
| 322 | if (nodes[nodes.length - 1].type === 'div') { |
| 323 | nodes = nodes.slice(0, -1) |
| 324 | } |
| 325 | return parser.stringify({ nodes }) |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | module.exports = Transition |