From 51a7cdff06480b0cf01180a67ec68cc63740e48e Mon Sep 17 00:00:00 2001 From: Michael Rowley Date: Fri, 31 Dec 2021 14:05:59 +0000 Subject: [PATCH] Added strToIpv6 import --- src/core/operations/Sort.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/operations/Sort.mjs b/src/core/operations/Sort.mjs index 2feb3587..8092f62c 100644 --- a/src/core/operations/Sort.mjs +++ b/src/core/operations/Sort.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation.mjs"; import Utils from "../Utils.mjs"; import {INPUT_DELIM_OPTIONS} from "../lib/Delim.mjs"; +import {strToIpv6} from "../lib/IP.mjs"; /** * Sort operation @@ -116,8 +117,7 @@ class Sort extends Operation { * @returns {number} */ static _ipv6Sort(a, b) { - const ipLib = require("../lib/IP.mjs"); - const numericalA = ipLib.strToIpv6(a, false), numericalB = ipLib.strToIpv6(b, false); + const numericalA = strToIpv6(a, false), numericalB = strToIpv6(b, false); return numericalA - numericalB; }