{"id":15862263,"url":"https://github.com/afeiship/next-step","last_synced_at":"2025-12-12T04:12:40.303Z","repository":{"id":57122879,"uuid":"59100661","full_name":"afeiship/next-step","owner":"afeiship","description":"Get current/next/previous step data.","archived":false,"fork":false,"pushed_at":"2021-08-09T01:36:52.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T06:07:47.981Z","etag":null,"topics":["actions","current","next","previous","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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-18T09:18:34.000Z","updated_at":"2021-08-09T01:38:11.000Z","dependencies_parsed_at":"2022-08-24T14:59:32.618Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-step","commit_stats":null,"previous_names":["afeiship/angular-down-app-tips"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-step/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709936,"owners_count":20821298,"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":["actions","current","next","previous","step"],"created_at":"2024-10-05T22:25:59.949Z","updated_at":"2025-12-12T04:12:35.268Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","readme":"# next-step\n\u003e Get current/next/previous step data.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-step\n```\n\n## usage\n```js\nimport '@jswork/next-step';\n\nconst items = [\n  {\n    id: 15,\n    status: 'W',\n    student: { id: 3, realname: '小明', photo: 'default-avatar.png' }\n  },\n  {\n    id: 65,\n    status: 'R',\n    student: { id: 7, realname: '测试3号', photo: 'default-avatar.png' }\n  },\n  { id: 115, status: 'R', student: { id: 8, realname: 'H彩', photo: 'default-avatar.png' } }\n];\n\nconst result1 = nx.step(items, {\n  callback: (item) =\u003e item.id === 15,\n  get: (item) =\u003e nx.get(item, 'id', null)\n});\n\nconst result2 = nx.step(items, {\n  callback: (item) =\u003e item.id === 65,\n  get: (item) =\u003e nx.get(item, 'id', null)\n});\n\nconst result3 = nx.step(items, {\n  callback: (item) =\u003e item.id === 115,\n  get: (item) =\u003e nx.get(item, 'id', null)\n});\n\n// result1 is: { current: 15, previous: null, next: 65 }\n// result2 is: { current: 65, previous: 15, next: 115 }\n// result3 is: { current: 115, previous: 65, next: null }\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-step/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-step\n[version-url]: https://npmjs.org/package/@jswork/next-step\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-step\n[license-url]: https://github.com/afeiship/next-step/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-step\n[size-url]: https://github.com/afeiship/next-step/blob/master/dist/next-step.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-step\n[download-url]: https://www.npmjs.com/package/@jswork/next-step\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-step/lists"}