{"id":20104969,"url":"https://github.com/qianlongo/underscore-analysis","last_synced_at":"2025-09-07T20:13:53.776Z","repository":{"id":79426079,"uuid":"72993154","full_name":"qianlongo/underscore-analysis","owner":"qianlongo","description":"underscore.js源码分析一点点进行中，欢迎watch","archived":false,"fork":false,"pushed_at":"2018-08-02T15:31:09.000Z","size":61,"stargazers_count":53,"open_issues_count":6,"forks_count":7,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-06-12T13:05:50.991Z","etag":null,"topics":["javascript","underscore"],"latest_commit_sha":null,"homepage":"https://github.com/qianlongo/underscore-analysis","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/qianlongo.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-06T13:40:09.000Z","updated_at":"2024-09-24T07:27:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf0e824e-63ac-4a71-8b33-81725d3416c5","html_url":"https://github.com/qianlongo/underscore-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qianlongo/underscore-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qianlongo%2Funderscore-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qianlongo%2Funderscore-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qianlongo%2Funderscore-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qianlongo%2Funderscore-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qianlongo","download_url":"https://codeload.github.com/qianlongo/underscore-analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qianlongo%2Funderscore-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274088625,"owners_count":25220260,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","underscore"],"created_at":"2024-11-13T17:45:26.514Z","updated_at":"2025-09-07T20:13:53.733Z","avatar_url":"https://github.com/qianlongo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 愿景\n\n\u003e 一直希望有一个机会可以阅读某库的源码，并写一些自己的想法和思考，最终将目标定在underscore.js,一个纯粹的js工具库，没有dom、bom的参与。\n下划线的许多api都是日常工作中会用到的，诸如`each`,`map`,`bind`,`isUndefined`...等,试想如果深入其中把这些api都整明白了，是不是会有许多收获呢！想想还有些小激动。\n\n\n## 阅读源码这几个月\n\n\u003e 老实说静下心来看完一个库是比较难得一件事，从开始阅读下划线到现在过去几个月，终于把它给整的差不多了，期间也看了网上别人的下划线源码分析(比如@老姚的[underscore库源码分析系列](http://www.qdfuns.com/house/17398/note/class/id/bb6dc3cabae6651b94f69bbd562ff370.html)就非常的不错)，这个过程有`心累`，有`慵懒`，有`喜悦`，有`收获`,原来坚持去做一件事真的能令人开森，如果你有兴趣，也可以花点时间去阅读下划线，相信你也会有所收获。\n\n## 文章书写计划\n\n\u003e 下划线的api组成总体来说分成\n\n1. object方法类\n2. 集合方法类\n3. array方法类\n4. function方法类\n5. 工具方法类\n\n所以基本上会按照这样的大的类别划分来书写源码分析的文章，中间可能会结合其他的js知识写一些零碎的文章。（路漫漫其修远兮，要加油啊，吼吼吼）\n\n## 源码预览\n\n\n[全文注释版本](https://github.com/qianlongo/underscore-analysis/blob/master/underscore-notes.js)\n\n[下划线源码](https://github.com/qianlongo/underscore-analysis/blob/master/underscore-1.8.3.js)\n\n## 文章列表\n\n* [(void 0)与undefined之间的小九九](https://github.com/qianlongo/underscore-analysis/issues/4) (2017-5-9)\n\n* [那些不起眼的小工具？](https://github.com/qianlongo/underscore-analysis/issues/5) (2017-5-10)\n\n* [教你认清这8大杀手锏](https://github.com/qianlongo/underscore-analysis/issues/6) (2017-5-11)\n\n* [悄悄地说一个bug](https://github.com/qianlongo/underscore-analysis/issues/7) (2017-5-12)\n\n* [如何写一个实用的bind？](https://github.com/qianlongo/underscore-analysis/issues/8) [2017-5-21]\n\n* [你要看看这些有趣的函数方法吗？](https://github.com/qianlongo/underscore-analysis/issues/9) [2017-5-26]","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqianlongo%2Funderscore-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqianlongo%2Funderscore-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqianlongo%2Funderscore-analysis/lists"}