Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
puzrin committed Dec 1, 2023
1 parent d4eeb3a commit b2a1179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions support/tlds_2char_gen.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
/* eslint-disable no-console */

import { createRequire } from 'node:module'
const require = createRequire(import.meta.url)

const tldList = require('tlds')
const tldList = createRequire(import.meta.url)('tlds')

function toRanges (str) {
const ranges = []
Expand Down
4 changes: 2 additions & 2 deletions test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { readFileSync } from 'fs'
import assert from 'node:assert'
import linkify from '../index.mjs'
import { createRequire } from 'node:module'
const require = createRequire(import.meta.url)
const tlds = require('tlds')

const tlds = createRequire(import.meta.url)('tlds')

let lines

Expand Down

0 comments on commit b2a1179

Please sign in to comment.