UNPKG

liftie

Version:

Clean, simple, easy to read, fast ski resort lift status

15 lines (13 loc) 265 B
const states = ['?', 'open', 'closed']; export default { selector: '.lifts li[data-locationid] > a', parse: { name: 1, status: { child: 0, attribute: 'class', regex: /(\d)$/, fn: s => states[Number.parseInt(s, 10)] } } };