{"id":27354406,"url":"https://github.com/lukaskubanek/ordereddictionary","last_synced_at":"2025-04-12T21:54:11.796Z","repository":{"id":53128246,"uuid":"41609244","full_name":"lukaskubanek/OrderedDictionary","owner":"lukaskubanek","description":"Ordered dictionary data structure implementation in Swift","archived":false,"fork":false,"pushed_at":"2021-11-29T16:56:05.000Z","size":4511,"stargazers_count":201,"open_issues_count":2,"forks_count":63,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-06T17:42:26.708Z","etag":null,"topics":["data-structure","dictionary","hash-map","ordereddictionary","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/lukaskubanek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-29T22:27:48.000Z","updated_at":"2024-10-17T07:25:24.000Z","dependencies_parsed_at":"2022-08-31T11:03:06.973Z","dependency_job_id":null,"html_url":"https://github.com/lukaskubanek/OrderedDictionary","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaskubanek%2FOrderedDictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaskubanek%2FOrderedDictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaskubanek%2FOrderedDictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaskubanek%2FOrderedDictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaskubanek","download_url":"https://codeload.github.com/lukaskubanek/OrderedDictionary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637803,"owners_count":21137538,"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-structure","dictionary","hash-map","ordereddictionary","swift"],"created_at":"2025-04-12T21:54:10.869Z","updated_at":"2025-04-12T21:54:11.779Z","avatar_url":"https://github.com/lukaskubanek.png","language":"Swift","readme":"# OrderedDictionary\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://github.com/lukaskubanek/OrderedDictionary/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/release/lukaskubanek/OrderedDictionary/all.svg?style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://developer.apple.com/swift\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat-square\" alt=\"Swift 5.0\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/SPM-compatible-brightgreen.svg?style=flat-square\" alt=\"Swift Package Manager\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat-square\" alt=\"Carthage\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"LICENSE.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square\" alt=\"License: MIT\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/lukaskubanek\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/contact-@lukaskubanek-olive.svg?style=flat-square\" alt=\"Twitter: @lukaskubanek\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nOrderedDictionary is a lightweight implementation of an ordered dictionary data structure in Swift.\n\nThe `OrderedDictionary\u003cKey: Hashable, Value\u003e` struct is a generic collection that combines the features of the `Dictionary` and `Array` data structures from the Swift standard library. Like `Dictionary`, it stores key-value pairs with each key being unique and maps each key to an associated value. Like `Array`, it stores those pairs sorted and accessible by a zero-based integer index.\n\n`OrderedDictionary` provides similar APIs to collections available in the Swift standard library like accessing contents by keys or indices, inserting and removing elements, iterating, sorting, transforming, filtering, etc.\n\nInternally, `OrderedDictionary` uses backing storage composed of a `Dictionary` for storing the key-value pairs and an `Array` for managing the ordered keys. This is certainly not the most performant implementation one can achieve, but it gets its job done while reusing most functionality from the Swift standard library.\n\n## Requirements\n\n- Swift 5.0 or later\n- Xcode 11 or later\n- iOS 8 or later / macOS 10.10 or later\n\n*For support of older Swift versions, please refer to older versions of this library. For Swift 4.2, use version 3.x, and for Swift 4.0-4.1, use version 2.x.*\n\n*The requirements for Xcode and OS versions only apply when the library is integrated as a framework or via the Xcode project.*\n\n## Installation\n\n### Swift Package Manager\n\nTo install OrderedDictionary using the [Swift Package Manager](https://swift.org/package-manager/), add it as a dependency into your `Package.swift` file:\n\n```swift\nlet package = Package(\n    ...\n    dependencies: [\n        .package(url: \"https://github.com/lukaskubanek/OrderedDictionary.git\", from: \"4.0.0\")\n    ],\n    ...\n)\n```\n\n### Carthage\n\nTo install OrderedDictionary using [Carthage](https://github.com/Carthage/Carthage), add it as a dependency into your `Cartfile`:\n\n```plain\ngithub \"lukaskubanek/OrderedDictionary\" ~\u003e 4.0\n```\n\nThen drag either the `OrderedDictionary.xcodeproj` or the `OrderedDictionary.framework` into your Xcode project/workspace and link your target against the `OrderedDictionary.framework`. Make sure that the framework [gets copied](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to your application bundle.\n\n### Git Submodules\n\nYou can also install OrderedDictionary via [Git submodules](http://git-scm.com/book/en/v2/Git-Tools-Submodules) and integrate the project `OrderedDictionary.xcodeproj` from the submodule directly into your Xcode workspace.\n\n### Note About CocoaPods\n\nAlthough there has been a high demand for [CocoaPods](https://cocoapods.org) support, this distribution method won't be officially supported by this library. If you really want to integrate this library via CocoaPods, you can create and maintain a custom podspec (see the last section of [this post](https://guides.cocoapods.org/syntax/podfile.html#pod)).\n\n## Usage \u0026 Docs\n\nFor the explanation of the API of `OrderedDictionary` and examples on how to use this data structure, please refer to the [documentation comments](Sources/OrderedDictionary/OrderedDictionary.swift) or the [comprehensive test suite](Tests/OrderedDictionaryTests).\n\n## Changelog\n\nTo view the changelog, refer to GitHub's [releases page](https://github.com/lukaskubanek/OrderedDictionary/releases). If you're upgrading from version 3.x, you might want to check out the list of changes made in [version 4.0](https://github.com/lukaskubanek/OrderedDictionary/releases/tag/v4.0.0).\n\n## Credits\n\nOrderedDictionary was built by [@lukaskubanek](https://twitter.com/lukaskubanek), the founder and  developer of [Diagrams](https://diagrams.app), a native diagram editor for Mac. This data structure is being used extensively for powering Diagrams' data model.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaskubanek%2Fordereddictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaskubanek%2Fordereddictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaskubanek%2Fordereddictionary/lists"}