npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gaopeng123/utils.types

v1.1.18-alpha.1

Published

类型判断

Downloads

433

Readme

types

data

| 函数名 | 作用 | | ------------------------------------- | ----------------------------------------------------------- | | isObject | 判断对象 | | isArray | 判断数组 | | isSparseArray | 是否是稀疏数组 | | isPromise | 判断Promise | | isFunction | 判断函数 | | isNumber | 判断数字 | | isBoolean | 判断boolean | | isTrue | true “true” 皆返回true | | isFalse | false “false” 皆返回false | | isUndefined | 判断undefined | | isNull | 判断null | | isString | 判断string | | isHasDom | 判断是否可以使用dom对象 | | isElement | 判断element | | isDate | 判断是否是Date类型 | | isUTC | 判断字符串是否是UTC格式 | | isEqualByObj | 判断对象是否相等(包括各个属性) | | isEqual | 判断数据是否相等,主要用于判断 1 = '1', true = 'true' 场景 | | isEmptyObject | 判断是否是空对象 | | isEmpty | 判断是否是空 null undefined '' [] {} 都为true | | isJSON | 判断是否为合法的可格式化的json字符串 | | isBuffer | 判断是否是buffer类型 | | isFormData | 判断是否是formData类型 | | isFile | 判断是否是file类型 | | isBlob | 判断是否是blob类型 | | isStream | 判断是否是stream流 | | isURLSearchParams | 判断是否是URLSearchParams类型 | | isFocus New 1.1.15+ | 判断是否聚焦 | | isUrl New 1.1.15+ | 判断是否是合法url |

browser

| 函数名 | 作用 | | ----------------------------------------- | ------------------------------------------------------------ | | isChrome | chrome浏览器 | | isFirefox | 火狐浏览器 | | isWebKit | WebKit内核 | | isSafari | Safari | | isOpera | Opera | | isGecko | Gecko | | isWindows | 是否是Windows系统 | | isMac | Mac系统 | | isLinux | Linux系统 | | isMobile | 移动端设备 Android、webOS、iPhone、iPod、BlackBerry | | isIOS | 移动端设备 iPhone、iPod | | isAndroid | 移动端设备 Android | | isStrict | 是否是严格模式 | | isSecure | 是否是https访问 | | isNodejs | 是否是node运行环境 | | isBrowser | 是否是浏览器运行环境 | | isWX | 是否在微信中运行 | | getPlatform | 获取终端信息{ browser: string, operatingSystem: string } 操作系统和浏览器 |

browser version

| 函数名 | 作用 | | -------------- | -------------- | | chromeVersion | 返回值为number | | firefoxVersion | 返回值为number | | ieVersion | 返回值为number | | operaVersion | 返回值为number | | safariVersion | 返回值为number | | webKitVersion | 返回值为number |