{"id":26942084,"url":"https://github.com/x-titan/list","last_synced_at":"2026-02-08T09:34:55.074Z","repository":{"id":106134786,"uuid":"464984751","full_name":"x-titan/list","owner":"x-titan","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-23T20:27:28.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T09:40:47.949Z","etag":null,"topics":["browser-js","javascript","js","linked-list","list"],"latest_commit_sha":null,"homepage":"https://x-titan.github.io/list/index.js","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/x-titan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-01T17:06:37.000Z","updated_at":"2026-01-23T20:27:32.000Z","dependencies_parsed_at":"2025-01-23T20:19:17.180Z","dependency_job_id":"c5d2ae07-e4e6-4490-acec-8c1c5eac1931","html_url":"https://github.com/x-titan/list","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/x-titan/list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-titan%2Flist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-titan%2Flist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-titan%2Flist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-titan%2Flist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-titan","download_url":"https://codeload.github.com/x-titan/list/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-titan%2Flist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29226470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:15:18.648Z","status":"ssl_error","status_checked_at":"2026-02-08T09:14:33.745Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["browser-js","javascript","js","linked-list","list"],"created_at":"2025-04-02T16:39:14.773Z","updated_at":"2026-02-08T09:34:55.048Z","avatar_url":"https://github.com/x-titan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Structures Library: List, Queue, and Stack\n\n_Read this in other languages:_\n[_Русский_](/doc/README.ru-RU.md)\n\nThis library provides implementations of essential data structures: [**Linked List (List)**][list], [**Queue**][queue], and [**Stack**][stack]. Each is exported as a function-class for convenient use.\n\n---\n\n## Installation\n\nFirst, install the library via NPM (if it's published) or clone the repository:\n\n```bash\nnpm install xtitan-list\n```\n\n---\n\n## Usage\n\n### [**List**][list]\nThe `List` implements most of the methods of JavaScript arrays, making it easy and intuitive to use.\n\n#### Supported Methods:\n- **`push(element)`**: Adds an element to the end of the list.\n- **`pop()`**: Removes the last element and returns it.\n- **`unshift(element)`**: Adds an element to the beginning of the list.\n- **`shift()`**: Removes the first element and returns it.\n- **`indexOf(element)`**: Returns the index of the specified element (or -1 if not found).\n- **`splice(index, count, ...elements)`**: Removes or adds elements at a specific index.\n- **`at(index)`**: Returns the element at the specified index (similar to `array.at()`).\n- **`find({ element, callback })`**: Finds an element by value or via a callback function.\n- **`concat(collection)`**: Merges the current list with another list or array.\n\n#### Unimplemented Methods (in development):\n- **`sort()`**: Sorts the list.\n- **`reverse()`**: Reverses the list.\n- **`filter(callback)`**: Filters the elements in the list.\n\n#### Example:\n```javascript\nimport { List } from 'xtitan-list';\n\nconst list = new List();\nlist.push(1);\nlist.push(2);\nlist.push(3);\n\nconsole.log(list.pop()); // 3\nconsole.log(list.indexOf(2)); // 1\n```\n\n---\n\n### [**Queue**][queue]\nA Queue is a data structure that operates on the **FIFO** principle (First In, First Out).\n\n#### Supported Methods:\n- **`enqueue(element)`** (alias for `push`): Adds an element to the end of the queue.\n- **`dequeue()`** (alias for `shift`): Removes the first element and returns it.\n- **`peek()`**: Returns the first element without removing it.\n\n#### Example:\n```javascript\nimport { Queue } from 'xtitan-list';\n\nconst queue = new Queue();\nqueue.enqueue('A');\nqueue.enqueue('B');\n\nconsole.log(queue.peek()); // 'A'\nconsole.log(queue.dequeue()); // 'A'\nconsole.log(queue.dequeue()); // 'B'\n```\n\n---\n\n### [**Stack**][stack]\nA Stack is a data structure that operates on the **LIFO** principle (Last In, First Out).\n\n#### Supported Methods:\n- **`push(element)`** (alias for `unshift`): Adds an element to the beginning of the stack.\n- **`pop()`** (alias for `shift`): Removes the first element and returns it.\n- **`peek()`**: Returns the first element without removing it.\n\n#### Example:\n```javascript\nimport { Stack } from 'xtitan-list';\n\nconst stack = new Stack();\nstack.push('X');\nstack.push('Y');\n\nconsole.log(stack.peek()); // 'Y'\nconsole.log(stack.pop()); // 'Y'\nconsole.log(stack.pop()); // 'X'\n```\n\n---\n\n## Future Plans\n- Implementation of the `sort`, `reverse`, and `filter` methods for `List`.\n- Performance optimizations and addition of new features.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.\n\n[list]: /src/list.js\n[queue]: /src/queue.js\n[stack]: /src/stack.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-titan%2Flist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-titan%2Flist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-titan%2Flist/lists"}