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

fcbox-goldeneye-utils

v1.0.0

Published

``` npm i -S fcbox-goldeneye-utils import utils from 'fcbox-goldeneye-utils' console.log(utils.arrJudge(['1','2'])) ```

Downloads

3

Readme

使用

npm i -S fcbox-goldeneye-utils
import utils from 'fcbox-goldeneye-utils'
console.log(utils.arrJudge(['1','2']))

arr.js 12

备注:目前数组相关工具类只支持一维数组

| 方法名 | 作用 | 参数 | 返回值 | 版本 | | --------------- | ------------------ | -------------------------------------------------------------------------- | ------------------- | ----- | | arrJudge | 判断是否是数组 | Boolean 值 | arr | 1.2.0 | | arrRemoveRepeat | 移除数组中重复的项 | arr | Array,处理的数组值 | 1.2.0 | | arrOrderAscend | 数组排序 | arr | Array,处理的数组值 | 1.2.0 | | arrMax | 数组中最大值 | arr | Array,处理的数组值 | 1.2.0 | | arrSum | 数组求和 | arr | Array,处理的数组值 | 1.2.0 | | arrObjSum | 数组对象求和 | arr | Array,处理的数组值 | 1.2.0 | | arrConcat | 数组合并 | arrOne:数组一;arrTwo:数组二 | Array,处理的数组值 | 1.2.0 | | arrIncludeValue | 数组中是否包含某值 | arr: 数组; value: 判断的值 | Array,处理的数组值 | 1.2.0 | | arrAndSet | 数组并集 | arrOne:数组一;arrTwo:数组二 | Array,处理的数组值 | 1.2.0 | | arrIntersection | 数组交集 | arrOne:数组一;arrTwo:数组二 | Array,处理的数组值 | 1.2.0 | | arrDifference | 数组差集 | arrOne:数组一;arrTwo:数组二 | Array,处理的数组值 | 1.2.0 | | arrTwoToArrObj | 数组合并成对象数组 | arrOne:数组一;arrTwo:数组二;oneKey:属性一(选传);twoKey:属性一(选传) | Array,处理的数组值 | 1.2.0 |

check.js 10

| 方法名 | 作用 | 参数 | 返回值 | 版本 | | ------------------------- | -------------------------- | --------------- | ---------- | ----- | | checkNum | 判断是否是数字 | data: 判断的值 | Boolean 值 | 1.2.0 | | checkLetter | 判断是否是数字 | data | Boolean 值 | 1.2.0 | | checkLowercaseLetter | 判断是否全部是小写字母 | Boolean 值 | data | 1.2.0 | | checkCapitalLetter | 判断是否是大写字母 | data | Boolean 值 | 1.2.0 | | checkNumOrLetter | 判断是否是字母或数字 | data | Boolean 值 | 1.2.0 | | checkChinese | 判断是否是中文 | data | Boolean 值 | 1.2.0 | | checkChineseNumberLettter | 判断是否是中文,数字或字母 | Boolean 值 | data | 1.2.0 | | checkEmail | 判断是否是邮箱 | Boolean 值 | data | 1.2.0 | | checkTelphone | 判断是否是手机号 | Boolean 值 | data | 1.2.0 | | checkUrl | 判断是正确的网址 | data | Boolean 值 | 1.2.0 |

client.js 4

| 方法名 | 作用 | 参数 | 返回值 | 版本 | | ------------------- | ----------------------- | ---- | ----------------------------------------------------------------- | ----- | | checkBrowser | 判断浏览器 | - | trident:IE;presto:opera;webKit:苹果、谷歌内核;gecko:火狐; | 1.2.0 | | checkIosAndroidIpad | 判断客户端类型 | - | ios:ios;android:android;iPad:iPad; | 1.2.0 | | checkWeixinQqUc | 判断微信,qq 或 uc | - | weixin:微信; qq:qq;uc:uc; | 1.2.0 | | checkIsIphoneX | 判断是否是 iPhoneX 序列 | - | Boolean | 1.2.0 |

str.js 7

| 方法名 | 作用 | 参数 | 返回值 | 版本 | | ------------------ | ---------------------- | ------------------------------------------------------------- | ------------ | ----- | | strTrimLeftOrRight | 去除字符左右空格 | str:处理字符; | 处理后的字符 | 1.2.0 | | strInclude | 字符是否包含 | str:处理字符;value:需要判断的值; | Boolean | 1.2.0 | | strBeginWith | 字符是否以某一字符开头 | str:处理字符;value:需要判断的值; | Boolean | 1.2.0 | | strReplace | 字符替换成另一字符 | str:处理字符;valueOne:需要替换的值;valueTwo:替换后的值; | 处理后的字符 | 1.2.0 | | strToCapital | 字符全部转化成大写 | str:处理字符; | 处理后的字符 | 1.2.0 | | strToLowercase | 字符全部转化成小写 | str:处理字符; | 处理后的字符 | 1.2.0 | | strToCapitalLetter | 字符转化成以大写开头 | str:处理字符; | 处理后的字符 | 1.2.0 |

url.js 1

| 方法名 | 作用 | 参数 | 返回值 | 版本 | | -------------- | ------------ | ------------- | ------ | ----- | | getQueryString | 获取路由传参 | name:传参属性 | 属性值 | 1.2.0 |