{"id":17219837,"url":"https://github.com/bradfloodx/stack-list","last_synced_at":"2025-08-13T19:08:02.259Z","repository":{"id":57369152,"uuid":"99053770","full_name":"bradfloodx/stack-list","owner":"bradfloodx","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-09T23:07:10.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-04T03:29:25.477Z","etag":null,"topics":["data-type","nodejs","stack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/stack-list","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/bradfloodx.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":"2017-08-02T00:12:22.000Z","updated_at":"2017-10-09T23:08:25.000Z","dependencies_parsed_at":"2022-09-09T18:20:49.564Z","dependency_job_id":null,"html_url":"https://github.com/bradfloodx/stack-list","commit_stats":null,"previous_names":["brad-sf/stack-list","bradleyflood/stack-list","bradfloodx/stack-list"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bradfloodx/stack-list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfloodx%2Fstack-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfloodx%2Fstack-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfloodx%2Fstack-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfloodx%2Fstack-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradfloodx","download_url":"https://codeload.github.com/bradfloodx/stack-list/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfloodx%2Fstack-list/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270295993,"owners_count":24560351,"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-08-13T02:00:09.904Z","response_time":66,"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":["data-type","nodejs","stack"],"created_at":"2024-10-15T03:50:53.710Z","updated_at":"2025-08-13T19:08:02.192Z","avatar_url":"https://github.com/bradfloodx.png","language":"JavaScript","readme":"# stack-list\nA Node.js JavaScript implementation of the stack data type. Supporting both LIFO via `push()` and `pop()`, and FIFO via `push()` and `shift()`.\n\n```bash\nnpm install stack-list\n```\n\n## Syntax\n```js\nnew StackList(initialValue);\n```\n\n### Parameters\n#### `initialValue`\nAn `Array` of values of any type to initially populate the stack list.\n\n### Methods\n#### `push()`\nPush a new value to the top of the stack.\n\n#### `pop()`\nTake the top most value off the list and return it.\n\n#### `shift()`\nTake the bottom most value off the list and return it.\n\n#### `peek()`\nView the top most value on the list.\n\n#### `inspect()`\nView the bottom most value on the list.\n\n#### `clear()`\nReset to an empty list.\n\n### Properties\n#### `size`\nThe number of elements in the list. Also available under alias property `length`.\n\n\n## Examples\n```js\nconst StackList = require('stack-list');\n\nlet list = new StackList(['Hey']); // Optional initial values\n\n// Push\nlist.push('Mate');\n\n// Get size\nlist.size; // 2\n\n// Peek top value\nlist.peek(); // 'Mate'\n\n// Pop top value\nlist.pop(); // 'Mate'\nlist.pop(); // 'Hey'\n\n// Clear stack\nlist.clear();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradfloodx%2Fstack-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradfloodx%2Fstack-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradfloodx%2Fstack-list/lists"}