Gear & Equipment

Cassettes

Access every music cassette in Dinkum, with its purchase price and source.


Type

Cassette

FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the cassette's icon, relative to images/
buyPricenumberPurchase price
buyUnitsstringCurrency the purchase price is in: 'Dinks' or 'Permit Points'
sourcestring[]Where the cassette is sold

Factory

import { cassettes } from 'dinkum-data'

cassettes() // all 15 cassettes
cassettes(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
bySourcebySource(source: string)Filter to cassettes obtainable from the given source (case-insensitive substring match).
import { cassettes } from 'dinkum-data'

cassettes().bySource("Jimmy's Boat").get()

Sorts

MethodSignatureDefaultDescription
sortByBuyPricesortByBuyPrice(order?: 'asc' | 'desc')'asc'Sort by buy price.

Terminal methods

MethodReturnsDescription
.get()Cassette[]All results
.first()Cassette | undefinedFirst result
.find(id)Cassette | undefinedFind by id
.findByName(name)Cassette | undefinedCase-insensitive exact name match
.search(query)Cassette[]Case-insensitive partial name match
.count()numberNumber of results

Examples

import { cassettes } from 'dinkum-data'

// Every cassette sold on Jimmy's Boat, cheapest first
cassettes().bySource("Jimmy's Boat").sortByBuyPrice().get()

Next steps

  • See Books for another small collectible module
  • Browse Equipment for the Boom Box these cassettes play in
  • Read the query builder guide for more filter patterns
Previous
Books