{"id":18303250,"url":"https://github.com/erickpetru/javascript-data-structures","last_synced_at":"2025-04-09T10:15:39.034Z","repository":{"id":46940860,"uuid":"149639441","full_name":"ErickPetru/javascript-data-structures","owner":"ErickPetru","description":"Collection of data structures created with ECMAScript 2015+, TypeScript definition files and Jest unit tests","archived":false,"fork":false,"pushed_at":"2023-01-03T15:16:56.000Z","size":364,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T04:26:18.693Z","etag":null,"topics":["data-structures","ecmascript2015","javascript","jest","typescript-definitions"],"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/ErickPetru.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}},"created_at":"2018-09-20T16:34:10.000Z","updated_at":"2021-06-18T10:44:34.000Z","dependencies_parsed_at":"2023-02-01T07:01:13.857Z","dependency_job_id":null,"html_url":"https://github.com/ErickPetru/javascript-data-structures","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/ErickPetru%2Fjavascript-data-structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickPetru%2Fjavascript-data-structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickPetru%2Fjavascript-data-structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickPetru%2Fjavascript-data-structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErickPetru","download_url":"https://codeload.github.com/ErickPetru/javascript-data-structures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018099,"owners_count":21034052,"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","ecmascript2015","javascript","jest","typescript-definitions"],"created_at":"2024-11-05T15:24:59.220Z","updated_at":"2025-04-09T10:15:39.004Z","avatar_url":"https://github.com/ErickPetru.png","language":"JavaScript","readme":"# JavaScript Data Structures\n\n\u003e Collection of data structures created with ECMAScript 2015+, TypeScript definition files and Jest unit tests.\n\n## Why?\n\nYou may be wondering why recreating functionalities like `Stack` and `Queue` when JavaScript already offers that via `Array`. Or even why creating a simple `HashTable` implementation when we already have `Map` to do much more.\n\nThis repository is not intended to propose data structures to be used in production instead of the native solutions, but as a playground to show classical data structures (commonly learnt in _Computer Science_ courses) recreated with modern ECMAScript 2015+ features, like `class`, `import`/`export` and `async`/`await`.\n\nSo, it can be used as a material for teachers considering JavaScript for _Data Structures_ classes, but also as a starting point for people who'd like to see modern ECMAScript 2015+ running right in [Node.js](https://nodejs.org/en/), without any previous transpilation.\n\n## Basic Usage\n\nIf you wanna run some samples of the data structures in use, just type:\n\n```bash\nnpm start\n```\n\nIf you wanna run the complete test suit with [Jest](https://jestjs.io/), use:\n\n```bash\nnpm run test\n```\n\n## Integrated with VS Code\n\nIf you're using [Visual Studio Code](https://code.visualstudio.com/), the project also contains a simple `launch.json` configurated with commands for those two tasks, so a simple \u003ckbd\u003eF5\u003c/kbd\u003e puts you running with support for breakpoints - even with `async`/`await`!\n\nAnd for the tests, if you plan to use Jest a lot while developing, try the [Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). This way you'll be able to run the tests in realtime while developing.\n\n## Interesting Facts\n\nAs of Node 12, the `--experimental-modules` flag [was updated](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff) to a new implementation for supporting ES modules just out of the box, so this repository shows how bleding edge ECMAScript can be used in Node without things like [esm](https://www.npmjs.com/package/esm) or [Babel](https://babeljs.io/).\n\nCuriously, Jest still depends on [@babel/plugin-transform-modules-commonjs](https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs) for transpiling ES modules to CommonJS modules before running the test suite. So, keep in mind that this dependecy isnn't needed for running the code itself.\n\nFinally, while the project is in JavaScript, all classes was created with separated TypeScript definition files (with `.d.ts` extension) to provide better intellisense - which can be easly achieved without using TypeScript itself.\n\n## License\n\nCopyright \u0026copy; 2019\n\nLicensed under the [MIT license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickpetru%2Fjavascript-data-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferickpetru%2Fjavascript-data-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickpetru%2Fjavascript-data-structures/lists"}