function noop() {
}
const extend = Object.assign;
const inBrowser = typeof window !== "undefined";
function isDef(val) {
  return val !== void 0 && val !== null;
}
function isFunction(val) {
  return typeof val === "function";
}
function isPromise(val) {
  return isObject(val) && isFunction(val.then) && isFunction(val.catch);
}
function isObject(val) {
  return val !== null && typeof val === "object";
}
function get(object, path) {
  const keys = path.split(".");
  let result = object;
  keys.forEach((key) => {
    var _a;
    result = (_a = result[key]) != null ? _a : "";
  });
  return result;
}
function pick(obj, keys, ignoreUndefined) {
  return keys.reduce((ret, key) => {
    if (!ignoreUndefined || obj[key] !== void 0) {
      ret[key] = obj[key];
    }
    return ret;
  }, {});
}
function once(fn) {
  return (...args) => {
    if (!fn)
      return;
    fn(...args);
    fn = null;
  };
}
export {
  extend,
  get,
  inBrowser,
  isDef,
  isFunction,
  isObject,
  isPromise,
  noop,
  once,
  pick
};
