From 0c09b1042bdc4720bfb548f7950d1ab24b89c249 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Mon, 21 Mar 2022 06:11:07 +0100 Subject: [PATCH] Replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- scripts/fetch-iana.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch-iana.js b/scripts/fetch-iana.js index f18b3d2..9c120aa 100644 --- a/scripts/fetch-iana.js +++ b/scripts/fetch-iana.js @@ -48,7 +48,7 @@ function generateRowMapper (headers) { } function normalizeHeader (val) { - return val.substr(0, 1).toLowerCase() + val.substr(1).replace(/ (.)/, function (s, c) { + return val.slice(0, 1).toLowerCase() + val.slice(1).replace(/ (.)/, function (s, c) { return c.toUpperCase() }) }