Generate visual representations of the networks underlying video-gamebooks on YouTube
https://youtube-maze.delab.re/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
497 B
17 lines
497 B
import util from 'util';
|
|
|
|
export const YOUTUBE_BASE = 'https://www.youtube.com/%s';
|
|
export const WATCH_BASE = util.format(YOUTUBE_BASE, 'watch?v=%s');
|
|
|
|
/**
|
|
* Escape double quotes in a string.
|
|
*/
|
|
export const escapeQuotes = str => str.replace(/"/g, '\\"');
|
|
|
|
/**
|
|
* Make a promise that is resolved in a point in the future.
|
|
*
|
|
* @param number time Time to wait before resolving the promise (ms).
|
|
* @return null
|
|
*/
|
|
export const sleep = time => new Promise(resolve => setTimeout(resolve, time));
|
|
|