{"id":15853556,"url":"https://github.com/iamlizu/stack","last_synced_at":"2025-04-01T18:45:33.336Z","repository":{"id":57117173,"uuid":"411602103","full_name":"IamLizu/stack","owner":"IamLizu","description":"A simple library, JavaScript implementation of Stack data structure, using Array.","archived":false,"fork":false,"pushed_at":"2021-09-29T10:40:35.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T21:21:39.225Z","etag":null,"topics":["data-structures","stack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@iamlizu/stack","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IamLizu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-29T09:03:39.000Z","updated_at":"2023-03-07T08:28:39.000Z","dependencies_parsed_at":"2022-08-23T04:40:26.446Z","dependency_job_id":null,"html_url":"https://github.com/IamLizu/stack","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/IamLizu%2Fstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamLizu%2Fstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamLizu%2Fstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamLizu%2Fstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamLizu","download_url":"https://codeload.github.com/IamLizu/stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246693246,"owners_count":20818836,"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","stack"],"created_at":"2024-10-05T19:21:36.858Z","updated_at":"2025-04-01T18:45:33.302Z","avatar_url":"https://github.com/IamLizu.png","language":"JavaScript","readme":"# stack\n\nJavascript implementation of [Stack data structure](\u003chttps://en.wikipedia.org/wiki/Stack_(abstract_data_type)\u003e), using [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).\n\n### Getting Started\n\n---\n\nInstall in your project with,\n\n```\nnpm install @iamlizu/stack\n```\n\nUsage example,\n\n```\nconst Stack = require(\"@iamlizu/stack\")\n\n// Create new instance\nconst stack1 = new Stack();\n\nstack1.push(10);\nconsole.log(stack1.getBuffer()) // [ 10 ]\n```\n\n### Available Methods\n\n---\n\n| Method        | Description                                        |\n| ------------- | -------------------------------------------------- |\n| getBuffer     | returns a shallow copy of the Stack array          |\n| isEmpty       | return `true` if empty                             |\n| push          | adds item to the Stack                             |\n| pop           | remove item from the Stack                         |\n| peek          | returns the top item from Stack without popping it |\n| size          | returns the length of the Stack                    |\n| clear         | resets the Stack to empty                          |\n| access(index) | returns the item on `index` from Stack             |\n| search(item)  | returns the `index` of given `item` in the Stack   |\n\n### Contributing\n\n---\n\nYou are very much appreciated to add new functionalities to this module. Please add all the required test cases for the functionality.\n\nYou may create a pull request and wait to get reviewed, merged.\n\n🚀 Happy coding!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamlizu%2Fstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamlizu%2Fstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamlizu%2Fstack/lists"}