{"id":21533635,"url":"https://github.com/dubisdev/pointer-stack-structure","last_synced_at":"2025-03-17T19:44:12.100Z","repository":{"id":107302379,"uuid":"596241531","full_name":"dubisdev/pointer-stack-structure","owner":"dubisdev","description":"A JavaScript implementation of a stack with a pointer","archived":false,"fork":false,"pushed_at":"2023-02-01T21:10:58.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T06:48:21.224Z","etag":null,"topics":["data-structures","pointers","stack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@dubisdev/pointer-stack-structure","language":"TypeScript","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/dubisdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-01T19:07:41.000Z","updated_at":"2023-02-01T21:12:14.000Z","dependencies_parsed_at":"2023-04-06T13:47:16.729Z","dependency_job_id":null,"html_url":"https://github.com/dubisdev/pointer-stack-structure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dubisdev%2Fpointer-stack-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dubisdev%2Fpointer-stack-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dubisdev%2Fpointer-stack-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dubisdev%2Fpointer-stack-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dubisdev","download_url":"https://codeload.github.com/dubisdev/pointer-stack-structure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244101580,"owners_count":20398358,"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":["data-structures","pointers","stack"],"created_at":"2024-11-24T02:33:56.907Z","updated_at":"2025-03-17T19:44:12.080Z","avatar_url":"https://github.com/dubisdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @dubisdev/pointer-stack-structure\n\nThis package implements something similar to a stack, but with a pointer. This is useful when you want to keep a stack of items, but you also want to navigate through the stack.\n\nUse cases:\n\n- Keep track of commands in a terminal (like in a shell)\n- A chat history\n- List of visited pages in a browser\n- Anywhere you want to store a list of items and navigate through them sequentially\n\n## Principles\n\n- The data structure is a simple array of items (type can be defined by the user)\n- New items are added at the end of the array.\n- The last added item can be accessed using the `peek` method.\n- When a new item is added, the pointer is set to that item (the last).\n- Navigation is done using a pointer that points to the current item. Youcan use `peek` anytime to get the last item without moving the pointer.\n- You can navigate through the history using the `getPrevious` and `getNext` methods or\n- Set the pointer to a specific item using the `setPointer` method.\n\n## License\n\nMIT © [David Jiménez](https://dubis.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdubisdev%2Fpointer-stack-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdubisdev%2Fpointer-stack-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdubisdev%2Fpointer-stack-structure/lists"}