See Financial-Times/github-label-sync for how-to use.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {readFileLines} from '../utils/file.mjs'; | |
const NUMBER_REGEX = /\d+/g; | |
const extractNumbers = (line, lineIndex) => { | |
const numbers = []; | |
let match; | |
while ((match = NUMBER_REGEX.exec(line)) != null) { | |
numbers.push({ | |
number: match[0], |
A Dazzle widget showing predictions for next arrivals at a TfL stop point, powered by Transport for London's Unified API.
- Copy
TflStopPointArrivals.js
to your dashboard project. - Add to your widgets and configure. For example:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\\.js$": "#F1E05A", | |
"\\.php$": "#4F5D95", | |
"\\.html": "#E44B23", | |
"\\.css$": "#563D7C", | |
"\\.scss$": "#563D7C", | |
"\\.sass$": "#563D7C", | |
"\\.module\\.js$": "#1976D2", | |
"\\.controller\\.js$": "#1976D2", | |
"\\.service\\.js$": "#1976D2", | |
"\\.directive\\.js$": "#1976D2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.js': | |
'IIFE': | |
'prefix': '()()' | |
'body': """ | |
(function () { | |
'use strict'; | |
$1 | |
})(); | |
""" |