Skip to content

Commit

Permalink
Prefer import syntax in TS
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Feb 11, 2025
1 parent 15eb258 commit 425cab0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/lib/emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ var __importStar =
return result;
};
})();
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const _ = __importStar(require("lodash"));
const compromise_1 = __importDefault(require("compromise"));
const emojilib = require("emojilib");
const nlp = require("compromise");
const twemoji = require("twemoji");
const WORD_BLACKLIST = [
"data",
Expand Down Expand Up @@ -194,7 +199,7 @@ function findEmoji(words) {
return result;
}
function words(txt) {
return nlp(txt)
return (0, compromise_1.default)(txt)
.normalize({ plurals: true, verbs: true })
.terms()
.out("array");
Expand Down
2 changes: 1 addition & 1 deletion src/lib/emoji.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as _ from "lodash";
import nlp from "compromise";
const emojilib = require("emojilib");
const nlp = require("compromise");
const twemoji = require("twemoji");

type Emoji = {
Expand Down

0 comments on commit 425cab0

Please sign in to comment.