{"id":16618075,"url":"https://github.com/smltq/jpublic","last_synced_at":"2025-03-21T14:31:30.925Z","repository":{"id":43414855,"uuid":"180332089","full_name":"smltq/jPublic","owner":"smltq","description":"在我们开发项目的时候，无论项目规模大小，在所难免会写一些工具型函数来解决一些问题，随着项目开发和维护的时间越来越长，这些工具型函数会越来越多，同时还会穿插在各个项目的各模块或者文件当中，使得项目变的越来越臃肿，也不方便复用和维护。这时我们就会提取出一个类似的工具库或者基础库作为项目基础依赖，在项目中重复利用起来。 为了这样的工具库或类库更易扩展、易维护、易复用和更加稳定，我们就需要更好的去管理完善工具库。","archived":false,"fork":false,"pushed_at":"2023-03-02T22:37:43.000Z","size":3898,"stargazers_count":40,"open_issues_count":7,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-01T07:11:10.662Z","etag":null,"topics":["common","javascript","jpublic","js","tool","utils"],"latest_commit_sha":null,"homepage":"https://smltq.github.io/jPublic/module-_.html#.DEFAULT_SCALE","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/smltq.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-09T09:27:02.000Z","updated_at":"2024-09-09T03:13:51.000Z","dependencies_parsed_at":"2024-10-28T10:36:50.589Z","dependency_job_id":"8d601fe0-32ea-4d42-afaf-5e60c52f7e3c","html_url":"https://github.com/smltq/jPublic","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smltq%2FjPublic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smltq%2FjPublic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smltq%2FjPublic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smltq%2FjPublic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smltq","download_url":"https://codeload.github.com/smltq/jPublic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141470,"owners_count":20404837,"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":["common","javascript","jpublic","js","tool","utils"],"created_at":"2024-10-12T02:19:01.508Z","updated_at":"2025-03-21T14:31:30.408Z","avatar_url":"https://github.com/smltq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jPublic\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/smltq/jPublic/pulls)\n[![GitHub stars](https://img.shields.io/github/stars/smltq/jPublic.svg?style=social\u0026label=Stars)](https://github.com/smltq/jPublic)\n[![GitHub forks](https://img.shields.io/github/forks/smltq/jPublic.svg?style=social\u0026label=Fork)](https://github.com/smltq/jPublic)\n \n交流QQ群：1017567122\n\n## 前言\n\n在我们开发项目的时候，无论项目规模大小，在所难免会写一些工具型函数来解决一些问题，随着项目开发和维护的时间越来越长，这些工具型函数会越来越多，同时还会穿插在各个项目的各模块或者文件当中，使得项目变的越来越臃肿，也不方便复用和维护。这时我们就会提取出一个类似的工具库或者基础库作为项目基础依赖，在项目中重复利用起来。\n为了这样的工具库或类库更易扩展、易维护、易复用和更加稳定，我们就需要更好的去管理完善工具库。\n\n## jPublic项目介绍\n\njPublic 是一个 JavaScript 工具库，它提供了一整套函数式编程的实用功能，但是不依赖任何第三方插件。它弥补了 jQuery、Underscore等没有实现的功能，希望能成为我们项目必不可少的部分。\n\njPublic 目前提供了80多个函数，包括常用的：debounce、throttle、poll等。\n\n本项目托管在GitHub上。 你可以通过issues page、QQ群等途径报告bug以及参与特性讨论。\n\njPublic是一个完全开源的JavaScript函数库。\n\n### 组织结构\n\n``` lua\n+-- docs  API文档\n|   +-- index.html          文档入口\n|   +-- ...\n+-- test  测试\n|   +-- utility.js\n|   +-- testIndex.html      单元测试入口\n|   +-- ...\n--- .gitignore              git忽略规则\n--- LICENSE                 开源协议\n--- README.md               项目说明\n--- favicon.ico             icon\n\n--- karma.conf.js           karma配置\n\n--- jsdoc.json              文档生成配置\n--- package.json            npm配置\n\n--- jPublic.js              源文件\n--- jPublic-min.js          压缩文件\n--- jPublic-min.map         sourcemap\n\n```\n\n### 环境配置\n\n技术 | 名称 | 官网\n----|------|----\nkarma| 测试框架  | [https://github.com/karma-runner](https://github.com/karma-runner)\nqunit| 单元测试工具  | [https://qunitjs.com/](https://qunitjs.com/)\njsdoc| 文档生成  | [https://github.com/jsdoc/jsdoc](https://github.com/jsdoc/jsdoc)\nTUI JSDoc Template|文档生成模板|[https://github.com/nhn/tui.jsdoc-template](https://github.com/nhn/tui.jsdoc-template)\nnodejs| js运行时  | [https://nodejs.org/zh-cn/](https://nodejs.org/zh-cn/)\nUglifyJS2| 压缩工具  | [https://github.com/mishoo/UglifyJS2/tree/v2.x](https://github.com/mishoo/UglifyJS2/tree/v2.x)\n\n### 引入方式\n\n\n- Require.js引入\n\n    ```require([\"jPublic\"]```\n\n- 页面引入\n\n    ```\u003cscript src=\"jPublic.min.js\"\u003e\u003c/script\u003e```\n  \n- vue引入\n\n    ```import _ from '@/utils/jPublic'```\n\n## 在线文档\n\n- API文档：https://smltq.github.io/jPublic/\n- 码云文档：https://tqlin.gitee.io/jpublic/module-_.html#.DEFAULT_SCALE（国内建议访问这个地址）\n- 码云仓库：https://gitee.com/tqlin/jPublic\n\n### 生成压缩及map文件\n\n    uglifyjs jPublic.js -o jPublic.min.js --source-map \"url='jPublic.min.js.map'\"\n    \n### 生成最新文档\n\n    jsdoc jPublic.js -d docs\n    \n## FAQ\n\n- [JavaScript空字符串判断](https://www.cnblogs.com/tqlin/p/10858492.html)\n- [这个正则怎么读](https://www.cnblogs.com/tqlin/p/10960127.html)\n\n## 许可证\n\n[MIT](LICENSE \"MIT\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmltq%2Fjpublic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmltq%2Fjpublic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmltq%2Fjpublic/lists"}