{"id":15060857,"url":"https://github.com/goswinr/arrayt","last_synced_at":"2025-07-11T03:32:21.981Z","repository":{"id":238709071,"uuid":"763199617","full_name":"goswinr/ArrayT","owner":"goswinr","description":"Extensions for Array\u003c'T\u003e in F#","archived":false,"fork":false,"pushed_at":"2025-06-09T15:37:16.000Z","size":194,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T22:48:00.131Z","etag":null,"topics":["array","fable","fsharp","library"],"latest_commit_sha":null,"homepage":"https://goswinr.github.io/ArrayT/","language":"F#","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/goswinr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-02-25T20:04:13.000Z","updated_at":"2025-05-20T19:37:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1071f52-6833-40b6-8b2c-f34c9331a16d","html_url":"https://github.com/goswinr/ArrayT","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"ce722cc3b28c5cdbe720878926ca983d286a0539"},"previous_names":["goswinr/arrayt"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/goswinr/ArrayT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goswinr%2FArrayT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goswinr%2FArrayT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goswinr%2FArrayT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goswinr%2FArrayT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goswinr","download_url":"https://codeload.github.com/goswinr/ArrayT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goswinr%2FArrayT/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721365,"owners_count":23653926,"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":["array","fable","fsharp","library"],"created_at":"2024-09-24T23:05:32.124Z","updated_at":"2025-07-11T03:32:21.975Z","avatar_url":"https://github.com/goswinr.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Logo](https://raw.githubusercontent.com/goswinr/ArrayT/main/Docs/img/logo128.png)\n# ArrayT\n\n[![ArrayT on nuget.org](https://img.shields.io/nuget/v/ArrayT)](https://www.nuget.org/packages/ArrayT/)\n[![Build Status](https://github.com/goswinr/ArrayT/actions/workflows/build.yml/badge.svg)](https://github.com/goswinr/ArrayT/actions/workflows/build.yml)\n[![Docs Build Status](https://github.com/goswinr/ArrayT/actions/workflows/docs.yml/badge.svg)](https://github.com/goswinr/ArrayT/actions/workflows/docs.yml)\n[![Test Status](https://github.com/goswinr/ArrayT/actions/workflows/test.yml/badge.svg)](https://github.com/goswinr/ArrayT/actions/workflows/test.yml)\n[![Check dotnet tools](https://github.com/goswinr/ArrayT/actions/workflows/outdatedDotnetTool.yml/badge.svg)](https://github.com/goswinr/ArrayT/actions/workflows/outdatedDotnetTool.yml)\n[![license](https://img.shields.io/github/license/goswinr/ArrayT)](LICENSE.md)\n![code size](https://img.shields.io/github/languages/code-size/goswinr/ArrayT.svg)\n\nArrayT is an F# extension and module library for `Array\u003c'T\u003e`\n\nIt also works in Javascript and Typescript with [Fable](https://fable.io/).\n\n### Motivation\nI was always annoyed that an IndexOutOfRangeException does not include the actual index that was out of bounds nor the actual size of the array.\nThis library fixes that in `array.Get`, `array.Set`, `array.Slice` and other item access functions.\n\nThis library was designed for use with F# scripting.\u003cbr\u003e\nFunctions and methods never return null.\u003cbr\u003e\nOnly functions starting with `try...` will return an F# Option.\u003cbr\u003e\nOtherwise when a function fails on invalid input it will throw a descriptive exception.\n\nSee also https://github.com/goswinr/ResizeArray/ for a similar library for `ResizeArray\u003c'T\u003e`.\n\n### It Includes:\n\n- An `Array` module that has a additional functions to the  `Array` module from [`FSharp.Core`](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-arraymodule.html).\u003cbr\u003e\nSee [docs](https://goswinr.github.io/ArrayT/reference/arrayt-array.html)\n\n- Extension members on `Array` like \u003cbr\u003e\n`.Get(idx)` `.Set(idx,item)` `.First` `.Last` `.SecondLast` `xs.DebugIdx.[i]` and more..\u003cbr\u003e\nWith nicer IndexOutOfRangeExceptions that include the bad index and the actual size.\u003cbr\u003e\nSee [docs](https://goswinr.github.io/ArrayT/reference/arrayt-autoopenarraytextensions.html)\n\n\n### Usage\nJust open the namespace\n\n```fsharp\nopen ArrayT\n```\nthis namespace contains:\n\n- a module also called `Array`. It will add additional functions to the `Array` module from `FSharp.Core`.\n\n- this will also auto open the extension members on `Array\u003c'T\u003e`\n\n### Example\n\n```fsharp\n#r \"nuget: ArrayT\"\nopen ArrayT\n\nlet xs = [| 0 .. 88 |]\n\nxs.Get(99)\n```\nthrows\n\n```\nSystem.IndexOutOfRangeException: Array.Get: Can't get index 99 from:\narray\u003cInt32\u003e with 89 items:\n  0: 0\n  1: 1\n  2: 2\n  3: 3\n  4: 4\n  ...\n  88: 88\n```\n\ninstead of the usual\n\n`System.IndexOutOfRangeException: Index was outside the bounds of the array.`\n\nIf you want to use the index notation `xs.[i]` instead of the Get method you can use the `DebugIdx` member\n\n`xs.DebugIdx.[i]`\n\n\n\n### Full API Documentation\n\n[goswinr.github.io/ArrayT](https://goswinr.github.io/ArrayT/reference/arrayt.html)\n\n\n### Tests\nAll Tests run in both javascript and dotnet.\nSuccessful Fable compilation to typescript is verified too.\nGo to the tests folder:\n\n```bash\ncd Tests\n```\n\nFor testing with .NET using Expecto:\n\n```bash\ndotnet run\n```\n\nfor JS testing with Fable.Mocha and TS verification:\n\n```bash\nnpm test\n```\n\n### License\n[MIT](https://github.com/goswinr/ArrayT/blob/main/LICENSE.md)\n\n### Changelog\nsee [CHANGELOG.md](https://github.com/goswinr/ArrayT/blob/main/CHANGELOG.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoswinr%2Farrayt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoswinr%2Farrayt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoswinr%2Farrayt/lists"}