created a replaceAll method for strings

This commit is contained in:
NunoSempere 2021-04-08 19:32:44 +02:00
parent 834d0dcad9
commit c8b1e3d28d
3 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import {upsert} from "../utils/mongo-wrapper.js"
/* Definitions */
let htmlEndPoint = 'https://www.cset-foretell.com/questions?page='
String.prototype.replaceAll = function replaceAll(search, replace) { return this.split(search).join(replace); }
/* Support functions */

View File

@ -8,6 +8,7 @@ import { upsert } from "../utils/mongo-wrapper.js"
/* Definitions */
let endpoints = ["https://goodjudgment.io/superforecasts/", "https://goodjudgment.io/economist/"]
String.prototype.replaceAll = function replaceAll(search, replace) { return this.split(search).join(replace); }
/* Support functions */

View File

@ -7,6 +7,7 @@ import { upsert } from "../utils/mongo-wrapper.js"
/* Definitions */
let hypermindEnpoint1 = 'https://predict.hypermind.com/dash/jsx.json'
String.prototype.replaceAll = function replaceAll(search, replace) { return this.split(search).join(replace); }
/* Support Functions */
function sleep(ms) {