GithubHelp home page GithubHelp logo

js-commonfunction's Introduction

js-commonFunction

工作中常见的一些js通用函数。主要分为数组,正则,对象,ajax,cookie,随机,其他七部分。

数组部分

  • 判断是否为数组
  • 数组去重
  • 复制数组
  • 数组最大值
  • 数组最小值
  • 类数组转为对象

正则部分

  • 邮箱正则
  • 手机正则
  • 中文正则

对象部分

  • 对象的深克隆

ajax

  • 常见的get,post,delete,put请求封装

cookie

  • 获取指定cookie值
  • 添加cookie值

随机部分

  • 随机颜色
  • 指定长度的随机字符串
  • 指定范围的随机数字
  • 指定范围的随机正数

其他部分

  • 回车事件的绑定
  • 以x为底y的对数

以后会逐渐添加,未完待续。

js-commonfunction's People

Contributors

tian-cai avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.