"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var inspect_exports = {};
__export(inspect_exports, {
  getKeys: () => getKeys,
  getOwn: () => getOwn,
  getOwnPropertyValues: () => getOwnPropertyValues
});
module.exports = __toCommonJS(inspect_exports);
var import_object = require("../primordials/object");
var import_predicates = require("./predicates");
// @__NO_SIDE_EFFECTS__
function getKeys(obj) {
  return (0, import_predicates.isObject)(obj) ? (0, import_object.ObjectKeys)(obj) : [];
}
// @__NO_SIDE_EFFECTS__
function getOwn(obj, propKey) {
  if (obj === null || obj === void 0) {
    return void 0;
  }
  return (0, import_object.ObjectHasOwn)(obj, propKey) ? obj[propKey] : void 0;
}
// @__NO_SIDE_EFFECTS__
function getOwnPropertyValues(obj) {
  if (obj === null || obj === void 0) {
    return [];
  }
  const keys = (0, import_object.ObjectGetOwnPropertyNames)(obj);
  const { length } = keys;
  const values = Array(length);
  for (let i = 0; i < length; i += 1) {
    values[i] = obj[keys[i]];
  }
  return values;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getKeys,
  getOwn,
  getOwnPropertyValues
});
