const { getPublicSuffix, getDomain, getSubdomain } = require('tldjs');

module.exports = {
  getDomain,
  getPublicSuffix,
  getSubdomain,
  mem: () => {
    console.log(process.memoryUsage().heapUsed);
    global.gc();
    console.log(process.memoryUsage().heapUsed);
  },
};

if (process.argv[process.argv.length - 1] === 'mem') {
  module.exports.mem();
}
