> For the complete documentation index, see [llms.txt](https://stash-it.gitbook.io/stash-it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stash-it.gitbook.io/stash-it/api/adapter/setextra-key-extra.md).

# setExtra(key, extra)

### **Arguments**

1. `key` *(string)*: Key to store the extra under (represents given item).
2. `extra` *(object)*: Extra data to replace existing one.

### **Returns**

*(object)*: The `extra` part of [Item](/stash-it/basic-structure.md#item) - here, the very same that was passed to be set.

*(undefined)*: If item is not found (thus no extra can be added), returns `undefined`.

### **Example**

```javascript
// `extra` will be either an object or undefined - depending if item exists or not
const extra = adapter.setExtra('key', { some: 'data' });
```
