Greasy Fork is available in English.

Coder Utils

【使用前先看介绍/有问题可反馈】Coder Utils (程序员工具):为程序员准备的常用 JavaScript 函数。

Autor
kalila-cc
Denně instalací
1
Celkem instalací
330
Hodnocení
1 0 0
Verze
0.4.8
Vytvořeno
06. 12. 2020
Aktualizováno
10. 04. 2021
Licence
neuvedeno
Spustit na
všech stránkách

Coder Utils(程序员工具)

为程序员准备的常用 JavaScript 函数。

观前提示

  • Greasy Fork 的脚本需要安装油猴(即 Tampermonkey ,一个用于脚本管理的插件)后才能使用
  • 若你当前使用的浏览器没有安装油猴,请前往安装后再回到该页面
  • 另外,推荐尽可能使用 Chrome 浏览器,因为脚本通常都会适配 Chrome 浏览器,而其他浏览器则不一定能够正常运行脚本

函数结构

  • 已有函数
    • ut
      • common
        • 深度拷贝 ($deepcopy)
        • 下载Blob ($downloadBlob)
        • 视频控制 ($videoControl)
      • type
        • 有效类型判断 ($isValid)
        • 有效数字判断 ($isValidNumber)
        • 有效对象判断 ($isObject)
        • 迭代对象判断 ($isIterable)
      • obj
        • 最小项目 ($min)
        • 最大项目 ($max)
        • 属性获取 ($prop)
        • 参数转换 ($parseQuery)
      • space
    • Number
      • attribute
        • 生成区间 ($range)
      • prototype
        • 区间判断 ($in)
        • 格式化 ($format)
    • String
      • prototype
        • 字符索引 ($at)
        • 格式化 ($format)
        • 文本解码 ($decodeUnicode)
        • 文本复制 ($copyToClipboard)
        • 参数转换 ($parseQuery)
        • 转换拼音 ($toPinyin)
        • 转换表格 ($toCsv)
        • 转换图片 ($toBase64Img)
    • Array
      • attribute
        • 元素打包 ($zip)
      • prototype
        • 元素索引 ($at)
        • 元素最小值 ($min)
        • 元素最大值 ($max)
        • 元素求累加 ($sum)
        • 元素求平均 ($avg)
        • 元素映射 ($map)
        • 元素搜索 ($where)
        • 元素归并 ($merge)
        • 元素移除 ($remove)
        • 元素交换 ($swap)
        • 元素排序 ($sorted)
        • 元素打乱 ($shuffled)
        • 索引重命名 ($reindex)
    • Date
      • prototype
        • 格式化 ($format)
    • NodeList
      • prototype
        • 元素映射 ($map)
        • 元素过滤 ($filter)
    • HTMLCollection
      • prototype
        • 元素映射 ($map)
        • 元素过滤 ($filter)
        • 元素迭代 ($forEach)
    • HTMLElement
      • attribute
        • 创建元素 ($mkel)
      • prototype
        • 插入元素 ($before)
        • 监听元素 ($monitor)

使用说明

脚本定义的函数,大部分定义于常用类的 attributeprototype 中,小部分被定义于 window.ut 中,具体函数使用说明请参照脚本代码详情页

作者想说

欢迎关注作者的 GitHub 主页,通过主页,你可以:

  • 了解本人的更多作品
  • 对代码或程序提出任何意见或建议
  • 联系作者