import Taro from "@tarojs/taro";
import {isObject} from "./utils";

const TaroUtils = {
  showToast(options) {
    if (!isObject(options)) {
      Taro.showToast({
        title: options,
        duration: 2000,
      }).then(() => {});
      return
    }
    Taro.showToast(options).then(() => {});
  }
}

export default TaroUtils;
