sf-utils2 sf-utils2
版本v3.3.3-beta1
首页
  • 01.快速开始 🔥
  • 02.基础-Base
  • 03.对象-Object
  • 04.数组-Array
  • 05.方法-Function
  • 06.字符串-String
  • 07.数学-Math
  • 08.dom
  • 09.拓展
  • webpack5.x教程学习 (opens new window)
  • 例子
  • 教程 🔥
  • 例子配置
企业级后台模版 (opens new window)
版本v3.3.3-beta1
首页
  • 01.快速开始 🔥
  • 02.基础-Base
  • 03.对象-Object
  • 04.数组-Array
  • 05.方法-Function
  • 06.字符串-String
  • 07.数学-Math
  • 08.dom
  • 09.拓展
  • webpack5.x教程学习 (opens new window)
  • 例子
  • 教程 🔥
  • 例子配置
企业级后台模版 (opens new window)
  • 快速开始

  • 基础-Base

    • 序言 👏
    • _typeof 🔥【获取对象类型】
      • 1.示例
      • 2.入参说明
      • 3.源码
    • isNumber【判断number类型】
    • isFunction 🔥判断function类型
    • isObject【判断对象类型】
    • isString【判断string类型】
    • isPlainObject【判断普通对象类型】
    • isArray【判断数组类型】
    • isNullable【判断空值】
    • isFloat【判断浮点类型】
    • isInteger【判断整数类型】
    • isSyncFunction【判断同步函数类型】
    • isAsyncFunction【判断异步函数类型】
    • isNoNullable【判断非空类型】
    • isBoolean【判断bool类型】
    • isSet【判断Set类型】
    • isPromise【判断Promise类型】
    • isSymbol【判断Symbol类型】
    • isWx【判断在微信中】
    • isIos【判断在ios设备中】
    • isAndroid【判断在安卓中】
    • browser【浏览器环境】
    • isNode 🔥【判断运行环境是nodejs】
    • isBrowser 🔥【判断在浏览器环境】
    • isPc【判断在pc环境】
    • isMobile【判断在移动端环境】
    • parseJsonNoError【解析JSON字符串】
    • uniqueId【全局唯一标识】🔥
    • uuid 【唯一序列号】🔥
    • parseURL【解析url为对象】
    • pageHelper【前端分页】🔥
    • commonRegex【常见的正则】
    • requireAllModule【自动化注册模块】
    • more 更多方法 🔥🔥🔥
  • 对象-Object

  • 数组-Array✨✨✨

  • 方法-Function

  • 字符串-String

  • 数学-Math

  • 文件-Buffer

  • 节点-dom

  • 拓展

  • nodejs

目录

_typeof 🔥【获取对象类型】

描述

返回数据类型

# 1.示例

import { _typeof } from 'sf-utils2'

_typeof('') // String
_typeof(null) // Null
_typeof({}) // Object
_typeof(Promise.resolve()) // Promise
_typeof([]) // Array
_typeof(new Set([])) // Set
_typeof(new Map([[1, () => {}]])) // Map
_typeof(0) // Number
_typeof(0.22) // Number
_typeof(new Date()) // Date
_typeof(window.cccc) // Undefined
1
2
3
4
5
6
7
8
9
10
11
12
13

# 2.入参说明

参数 说明 类型 是否必填
args any 是

# 3.源码

详情见下 👇 (opens new window)

上次更新: 2024/01/08, 21:47:25
序言 👏
isNumber【判断number类型】

← 序言 👏 isNumber【判断number类型】→

Theme by Vdoing | Copyright © 2022-2025 bianpengfei
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×