GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - skillnull/Common-JS-Library: 常用JS方法库(加解密、动画、数据处理、DOM处理、表单验证、时间处理、媒体、Ajax封装、获取URL参数等多种常用方法库)

BranchesTags
Open more actions menu

Latest commit

 

History

106 Commits
106 Commits

Folders and files

NameName
Last commit message
Last commit date
Native-JavaScript
Native-JavaScript
 
 
React
React
 
 
Vue
Vue
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

License MIT

常用JS方法库(Common-JS-Library)

原生JS

  • 缓存
    • IndexedDB
  • 动画
    • 落彩条动画效果
  • 加密解密
    • Base64
  • 媒体
    • 音频播放
  • Form表单验证常用方法
    • 验证邮箱
    • 验证手机号
    • 去除字符串前后空格
    • 去除字符串所有空格
    • 图片的预加载
    • 验证密码,密码为6-12位字母数字或符号最少两种组合,特殊符号为 ~!@#$%^&*.,
    • 仅允许输入正整数
    • 仅允许输入负整数
    • 校验身份证号
  • Json数据处理
    • Json字符串格式化
  • 文件上传
    • 图片上传
  • 数据处理
    • 保留小数并千分位格式化
    • 递归遍历数组对象,将结果去重
    • 数字单位格式化
    • 获取对象长度
    • HTML实体编码转换
    • 数组拉平
    • 从数组中随机选取指定数量的值
    • 洗牌算法打乱数组顺序
  • 数据类型处理
    • 合并两个函数
    • 深度比较两个对象是否相等
    • 深度比较两个数组是否相等
    • 深度拷贝
  • DOM相关处理
    • 监听浏览器标签页的显示与隐藏
    • 监听dom变化
    • 滚动到底部
    • 页面title滚动
    • 阻止滚动穿透
    • 水印
    • 点击元素外部
    • 禁止橡皮筋效果
  • 时间相关处理
    • 比较两个时间的时间差
    • 图表根据时间进行补点
    • 随机生成时间段内的日期
    • 多长时间以前
    • 时间段内倒计时
    • 定时器
  • 滚动条处理

  • 获取url的参数值,兼容search和hash

  • 原生ajax封装

  • 传入event则阻止冒泡

  • 动态计算rem

  • 复制内容

React

  • 自定义 Hooks
    • 获取useState最新值

Vue

  • Vue2 指令
    • 点击元素外部关闭元素
    • 图片懒加载
  • Vue2 过滤器
    • 时间格式化

About

常用JS方法库(加解密、动画、数据处理、DOM处理、表单验证、时间处理、媒体、Ajax封装、获取URL参数等多种常用方法库)

Topics

common-js-libraryjavascriptjavascript-libraryjs-librarylibrary

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.