407 B
407 B
title |
---|
getAsArray() |
array attributes.getAsArray(string key)
Will return an array with the value of attribute stored under key
, or false
if it's not set.
let { Path, paths } = part.shorthand();
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
let class = paths.demo.attributes.getAsArray('class');
// class now holds: ["classA", "classB"]