{"id":15349034,"url":"https://github.com/suyanhanx/hanutil","last_synced_at":"2025-04-15T04:16:52.188Z","repository":{"id":33168455,"uuid":"150105860","full_name":"suyanhanx/hanutil","owner":"suyanhanx","description":"A repository of JavaScript common utils","archived":false,"fork":false,"pushed_at":"2023-07-11T20:55:02.000Z","size":344,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-04-06T05:39:19.174Z","etag":null,"topics":["javascript","javascript-library","util","utils"],"latest_commit_sha":null,"homepage":"https://suyan.moe/hanutil","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suyanhanx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-24T13:20:57.000Z","updated_at":"2020-07-17T10:47:10.000Z","dependencies_parsed_at":"2022-08-07T20:15:09.885Z","dependency_job_id":null,"html_url":"https://github.com/suyanhanx/hanutil","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyanhanx%2Fhanutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyanhanx%2Fhanutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyanhanx%2Fhanutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyanhanx%2Fhanutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suyanhanx","download_url":"https://codeload.github.com/suyanhanx/hanutil/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248699176,"owners_count":21147597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-library","util","utils"],"created_at":"2024-10-01T11:53:38.809Z","updated_at":"2025-04-15T04:16:52.154Z","avatar_url":"https://github.com/suyanhanx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hanutil\n\n[![npm](https://img.shields.io/npm/v/hanutil.svg)](https://www.npmjs.com/package/hanutil)\n![Build Status](https://img.shields.io/travis/suyanhanx/hanutil/master.svg)\n[![Coverage Status](https://img.shields.io/coveralls/github/suyanhanx/hanutil/develop.svg)](https://coveralls.io/github/suyanhanx/hanutil?branch=develop)\n![LICENSE MIT](https://img.shields.io/npm/l/hanutil.svg)\n![LGTM](https://img.shields.io/lgtm/grade/javascript/g/suyanhanx/hanutil.svg)\n\n## 前端公共方法库\n\n为了节约花在项目编写时寻找常用方法的时间，开设此库，方便使用。\n\n## 引入方式\n可以完整引入整个包方便取用，也可以单独引入一个方法\n``` javascript\n// 只引入部分方法('hanutil/\u003c方法名\u003e')\nconst isArray = require('hanutil/isArray')\n```\n\n## APIs\n具体函数签名可以参考[index.d.ts][index]\n\n### Array\n\n#### [arrayEqual: \u0026emsp; 判断两个数组是否相同][arrayEqual]\n#### [convertClass: \u0026emsp; 将 String, Object, Array 转成 Array][convertClass]\n#### [isArray: \u0026emsp; 判断是否是一个数组][isArray]\n\n### Cookie\n\n#### [getCookie: \u0026emsp; 获取cookie][getCookie]\n#### [removeCookie: \u0026emsp; 移除cookie][removeCookie]\n#### [setCookie: \u0026emsp; 设置cookie][setCookie]\n\n### Function\n\n#### [debounce: \u0026emsp; 函数防抖][debounce]\n#### [throttle: \u0026emsp; 函数节流][throttle]\n\n### Object\n\n#### [deepAssign: \u0026emsp; 深度合并][deepAssign]\n#### [deepClone: \u0026emsp; 深克隆][deepClone]\n#### [getProperty: \u0026emsp; 由路径获取属性值][getProperty]\n#### [isDef: \u0026emsp; 判断是否已定义][isDef]\n#### [isEmptyObject: \u0026emsp; 判断是否是空对象][isEmptyObject]\n\n### Validate\n\n#### [isCarNumber: \u0026emsp; 车牌号验证][isCarNumber]\n#### [isEmail: \u0026emsp; 电子邮箱email验证][isEmail]\n#### [isIdCard: \u0026emsp; 身份证号码验证][isIdCard]\n#### [isPhoneNum: \u0026emsp; 手机号验证][isPhoneNum]\n#### [isTaxNumber: \u0026emsp; 税号验证][isTaxNumber]\n\n[index]:https://github.com/suyanhanx/hanutil/blob/master/index.d.ts\n\n[arrayEqual]:https://github.com/suyanhanx/hanutil/blob/master/src/array/arrayEqual.js\n[convertClass]:https://github.com/suyanhanx/hanutil/blob/master/src/array/convertClass.js\n[isArray]:https://github.com/suyanhanx/hanutil/blob/master/src/array/isArray.js\n\n[getCookie]:https://github.com/suyanhanx/hanutil/blob/master/src/cookie/getCookie.js\n[removeCookie]:https://github.com/suyanhanx/hanutil/blob/master/src/cookie/removeCookie.js\n[setCookie]:https://github.com/suyanhanx/hanutil/blob/master/src/cookie/setCookie.js\n\n[debounce]:https://github.com/suyanhanx/hanutil/blob/master/src/function/debounce.js\n[throttle]:https://github.com/suyanhanx/hanutil/blob/master/src/function/throttle.js\n\n[deepAssign]:https://github.com/suyanhanx/hanutil/blob/master/src/object/deepAssign.js\n[deepClone]:https://github.com/suyanhanx/hanutil/blob/master/src/object/deepClone.js\n[getProperty]:https://github.com/suyanhanx/hanutil/blob/master/src/object/getProperty.js\n[isDef]:https://github.com/suyanhanx/hanutil/blob/master/src/object/isDef.js\n[isEmptyObject]:https://github.com/suyanhanx/hanutil/blob/master/src/object/isEmptyObject.js\n\n[isCarNumber]:https://github.com/suyanhanx/hanutil/blob/master/src/validate/isCarNumber.js\n[isEmail]:https://github.com/suyanhanx/hanutil/blob/master/src/validate/isEmail.js\n[isIdCard]:https://github.com/suyanhanx/hanutil/blob/master/src/validate/isIdCard.js\n[isPhoneNum]:https://github.com/suyanhanx/hanutil/blob/master/src/validate/isPhoneNum.js\n[isTaxNumber]:https://github.com/suyanhanx/hanutil/blob/master/src/validate/isTaxNumber.js\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuyanhanx%2Fhanutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuyanhanx%2Fhanutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuyanhanx%2Fhanutil/lists"}