'use strict';

/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/isServer.ts
function isServer() {
  return typeof window === "undefined";
}

// src/isSlowConnection.ts
function isSlowConnection() {
  if (isServer()) {
    return;
  }
  const cn = navigator.connection;
  if (cn && (cn.saveData || /2g/.test(cn.effectiveType))) {
    return true;
  }
  return false;
}

exports.isSlowConnection = isSlowConnection;
