Access every wearable clothing item in Dinkum across every slot, including catalogue availability and set membership.
Type
Clothing
| Field | Type | Description |
|---|
id | string | Stable identifier |
name | string | Display name |
img | string | Path to the item's icon, relative to images/ |
source | string[]? | Where the item is obtained |
baseSellPrice | number | Base sell price in Dinks |
buyPrice | number? | Purchase price, if purchasable |
displayPrice | number | null | Price shown at Clover's Catalogue, or null if unavailable |
cataloguePrice | number | null | Actual catalogue purchase price, or null if unavailable |
cloversCatalogue | boolean | Whether the item is available in Clover's Catalogue |
slot | ClothingSlot[] | Slots the item occupies: 'Head', 'Face', 'Body', 'Legs', 'Feet' |
type | string | Clothing type, for example 'Hood', 'Shirt', 'Boots' |
set | string | Set name, or an empty string if not part of a set |
The exact type values valid for each slot are enforced by the separate Clothing Slots module.
Factory
import { clothing } from 'dinkum-data'
clothing()
clothing(source)
Filters
| Method | Signature | Description |
|---|
bySlot | bySlot(slot: ClothingSlot) | Filter to clothing that occupies the given slot. |
byType | byType(type: string) | Filter by clothing type (case-insensitive). |
bySet | bySet(set: string) | Filter to clothing belonging to the given set (case-insensitive). |
cloversCatalogue | cloversCatalogue() | Filter to clothing available in Clover's Catalogue. |
import { clothing } from 'dinkum-data'
clothing().bySlot('Head').get()
clothing().byType('Hood').get()
clothing().bySet('Aurora Set').get()
clothing().cloversCatalogue().get()
Sorts
| Method | Signature | Default | Description |
|---|
sortByBaseSellPrice | sortByBaseSellPrice(order?: 'asc' | 'desc') | 'desc' | Sort by base sell price. |
Terminal methods
| Method | Returns | Description |
|---|
.get() | Clothing[] | All results |
.first() | Clothing | undefined | First result |
.find(id) | Clothing | undefined | Find by id |
.findByName(name) | Clothing | undefined | Case-insensitive exact name match |
.search(query) | Clothing[] | Case-insensitive partial name match |
.count() | number | Number of results |
Examples
import { clothing } from 'dinkum-data'
clothing().bySlot('Head').sortByBaseSellPrice().get()
clothing().bySet('Aurora Set').get()
clothing().cloversCatalogue().get()
Next steps