// Shim lodash to use WordPress global when available and fallback to local debounce.
import { debounce as localDebounce } from '../utils/debounce';

const globalLodash = typeof window !== 'undefined' ? window.lodash : null;

export const debounce = (globalLodash && globalLodash.debounce) || localDebounce;

export default {
  debounce,
};
