mirror of
https://github.com/thelounge/thelounge.git
synced 2026-03-14 14:35:50 +01:00
Replace request with got
This commit is contained in:
parent
21cb4dca1e
commit
fe68f2a1ee
7 changed files with 101 additions and 107 deletions
|
|
@ -1,14 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
const request = require("request");
|
||||
const got = require("got");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const fuzzy = require("fuzzy");
|
||||
|
||||
request.get({
|
||||
url: "https://raw.githubusercontent.com/emojione/emojione/master/extras/alpha-codes/eac.json",
|
||||
json: true,
|
||||
}, (error, response, emojiStrategy) => {
|
||||
(async () => {
|
||||
const response = await got("https://raw.githubusercontent.com/emojione/emojione/master/extras/alpha-codes/eac.json");
|
||||
const emojiStrategy = JSON.parse(response.body);
|
||||
const emojiMap = {};
|
||||
const fullNameEmojiMap = {};
|
||||
|
||||
|
|
@ -57,7 +56,7 @@ request.get({
|
|||
"libs",
|
||||
"fullnamemap.json"
|
||||
)), fullNameEmojiMapOutput);
|
||||
});
|
||||
})();
|
||||
|
||||
function stringToUnicode(key) {
|
||||
return key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue