That is not an honest comparison, though.
import { getCodec } from "iconv-lite";
would be var getCodec = require("iconv-lite").getCodec;