1
0
Fork 0
freesewing/markdown/dev/reference/api/attributes/get/en.md

23 lines
459 B
Markdown
Raw Normal View History

---
title: get()
---
```js
string attributes.get(string key)
```
Will return the value of attribute stored under `key`, or `false` if it's not set.
If key has multiple values, they will be joined together in a string, seperated by spaces.
```js
let { Path, paths } = part.shorthand();
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
let class = paths.demo.attributes.get('class');
// class now holds: "classA classB"
```