{"id":17652409,"url":"https://github.com/bashleigh/twig-test","last_synced_at":"2025-03-30T09:12:59.358Z","repository":{"id":103668497,"uuid":"347025437","full_name":"bashleigh/twig-test","owner":"bashleigh","description":"Quick test for chunked array forming","archived":false,"fork":false,"pushed_at":"2021-03-12T10:22:20.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T11:17:20.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bashleigh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-12T10:21:47.000Z","updated_at":"2023-03-10T08:05:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c909de62-bd31-450f-8805-2c355d3ee157","html_url":"https://github.com/bashleigh/twig-test","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/bashleigh%2Ftwig-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Ftwig-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Ftwig-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Ftwig-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bashleigh","download_url":"https://codeload.github.com/bashleigh/twig-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296615,"owners_count":20754635,"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":[],"created_at":"2024-10-23T11:46:54.477Z","updated_at":"2025-03-30T09:12:59.332Z","avatar_url":"https://github.com/bashleigh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twig Test\n\nFrom the example provided, I presumed the given number was the desired output of chunks and the array provided was to be chunked. Reminded me of binary handling with C++ and the serial port for connecting to microcontrollers over a bus.\n\n### Install\n\nI prefer yarn over npm but feel free to use npm if you wish! Only dependancies are tsc, prettier and jest\n\n```bash\n$ yarn\n```\n\n### Testing\n\nRun the jest tests\n\n```bash\n$ yarn test\n```\n\nI've provided some basic tests. The results are not entirely desirable so I may come back and resolve some issues.\n\n## Commenting\n\nI usually don't comment my code a lot? Line by line anyway, I sometimes use comment blocks on the top of functions if I feel them necessary. I use git a lot to portrait the comments of lines or code blocks if required. \nComment blocks in TypeScript provide IDE syntax highlighting snippets which is why I use them, specially for packages. \n\n\n## Improvements\n\nI did try reversing the array so that if there was an overlap of values, the first array would contain the overlap but the values were then reversed as `[[2,1],[4,3], [5]]` which I didn't want to provide. As of right now I want to resolve the issue with the `reverse stress` test where the result is `[[], [], [], [], [], [], [], [1]]` where an array of 8 chunks is required from an array provided of length 1. I think this would come down to requirements? \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashleigh%2Ftwig-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbashleigh%2Ftwig-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashleigh%2Ftwig-test/lists"}