chore: uses hack for consistent esm support

This commit is contained in:
Akshay Nair
2023-09-22 22:31:12 +05:30
parent 640d0474c1
commit 12d685e1a1
+2 -1
View File
@@ -2,7 +2,8 @@ const R = require('ramda');
const { VALID_RECORD_TYPES } = require('./constants');
const { or, and, validate, between, testRegex, withLengthEq, withLengthGte } = require('./helpers');
const INVALID_NAMES = require('./invalid-domains.json');
const { default: ipRegex } = require('ip-regex');
const ipRegex_ = require('ip-regex');
const ipRegex = ipRegex_.default ?? ipRegex_;
const isValidURL = and([R.is(String), testRegex(/^https?:\/\//ig)]);