{"id":15963006,"url":"https://github.com/lovetingyuan/ty-step","last_synced_at":"2026-06-25T09:31:03.602Z","repository":{"id":57383104,"uuid":"81731416","full_name":"lovetingyuan/ty-step","owner":"lovetingyuan","description":"简单的异步流程控制工具","archived":false,"fork":false,"pushed_at":"2017-03-21T08:38:42.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T10:02:23.490Z","etag":null,"topics":["async","flow-control","step","ty-step"],"latest_commit_sha":null,"homepage":"","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/lovetingyuan.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":"2017-02-12T14:24:09.000Z","updated_at":"2017-02-23T00:23:44.000Z","dependencies_parsed_at":"2022-09-11T04:10:29.195Z","dependency_job_id":null,"html_url":"https://github.com/lovetingyuan/ty-step","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovetingyuan/ty-step","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fty-step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fty-step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fty-step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fty-step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovetingyuan","download_url":"https://codeload.github.com/lovetingyuan/ty-step/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fty-step/sbom","scorecard":{"id":600204,"data":{"date":"2025-08-11","repo":{"name":"github.com/lovetingyuan/ty-step","commit":"d30f19af6000d58090852b5453c4b20e9647aab0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T00:13:03.525Z","repository_id":57383104,"created_at":"2025-08-21T00:13:03.525Z","updated_at":"2025-08-21T00:13:03.525Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34769610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":["async","flow-control","step","ty-step"],"created_at":"2024-10-07T16:22:16.117Z","updated_at":"2026-06-25T09:31:03.584Z","avatar_url":"https://github.com/lovetingyuan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ty-step\n\n[![travis-ci](https://travis-ci.org/lovetingyuan/ty-step.svg?branch=master \"CI\")](https://travis-ci.org/lovetingyuan/ty-step)\n[![Version](https://img.shields.io/npm/v/ty-step.svg \"version\")](https://www.npmjs.com/package/ty-step)\n[![Dependencies](https://david-dm.org/lovetingyuan/ty-step/status.svg \"dependencies\")](https://david-dm.org/lovetingyuan/ty-step)\n[![License](https://img.shields.io/npm/l/ty-step.svg \"License\")](https://github.com/lovetingyuan/ty-step/blob/master/LICENSE)\n\n简单的异步流程控制，可以以并行或串行的方式执行给定的函数序列，支持参数传递和错误捕获\n\nInspired by [`step`](https://github.com/creationix/step) and [`gulp-sequence`](https://github.com/teambition/gulp-sequence)\n\n---------\n## Install\n`npm install ty-step` or `\u003cscript src=\"index.min.js\"\u003e\u003c/script\u003e`\n\n## Usage\n\n```javascript\nvar step = require('ty-step') // or window.step for browsers\nvar af = function (time) {\n  return function (next, payload) {\n    setTimeout(function () {\n      next(null, time)\n    }, time)\n  }\n}\nvar task = step(af(200), af(100), [af(150), af(80), af(250)], af(400), af(50))\ntask(function (err, payload) {\n  if (err)\n    console.error(err)\n  else\n    console.log(payload) // payload = [200, 100, [80, 150, 250], 400, 50]\n})\n```\n\n`step`接收一系列的函数或者由函数组成的数组作为参数，这些函数代表要执行的任务，接收`next`和`payload`作为参数。`next`在任务结束时调用，传入的参数为`error`和`data`，`error`代表上一个函数是否发生了错误，若不为`null`则表示发生了错误，会中断执行后续函数，`data`表示上一个函数中`next`传递的结果。`step`返回一个`thunk`函数，传递的`callback`表示对最终结果的处理，同样接收`error`和`data`作为参数\n\n## License\n**MIT**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovetingyuan%2Fty-step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovetingyuan%2Fty-step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovetingyuan%2Fty-step/lists"}