# ankurp/dollar

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ankurp-dollar).**

4,240 stars · 362 forks · Swift · MIT

## Links

- GitHub: https://github.com/ankurp/Dollar
- Homepage: https://www.dollarswift.org
- awesome-repositories: https://awesome-repositories.com/repository/ankurp-dollar.md

## Description

Dollar is a functional programming library for Swift that provides a comprehensive toolkit for collection manipulation, string processing, mathematical calculations, and date and time management. It serves as a utility suite for filtering, aggregating, and restructuring arrays and dictionaries.

The project implements functional programming patterns such as currying, memoization, and function composition. It also features a chainable wrapper interface that allows multiple data transformations to be applied sequentially before extracting a final result.

The library covers a wide range of capability areas, including text sanitization and casing conversion, regular expression operations, and the calculation of mathematical values like factorials and divisors. It also includes tools for parsing Unix timestamps and calculating relative time offsets.

The toolkit extends Swift standard library types with generic methods for data transformation and aggregation.

## Tags

### Data & Databases

- [Swift Collection Extensions](https://awesome-repositories.com/f/data-databases/array-manipulation-utilities/swift-collection-extensions.md) — Extends Swift arrays and dictionaries with generic methods for advanced manipulation and transformation.
- [Transformation Chains](https://awesome-repositories.com/f/data-databases/data-transformation-functions/transformation-chains.md) — Wraps collections in a proxy object to apply multiple sequential transformations before extracting the final result. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Array Transformations](https://awesome-repositories.com/f/data-databases/array-element-modifiers/array-transformations.md) — Maps array elements to new values or flattens nested collections into a single-level array. ([source](https://www.dollarswift.org))
- [Element Filtering](https://awesome-repositories.com/f/data-databases/array-element-modifiers/element-filtering.md) — Provides predicate-based filtering to create subsets of arrays or remove empty values. ([source](https://www.dollarswift.org))
- [Collection Element Transformations](https://awesome-repositories.com/f/data-databases/collection-element-transformations.md) — Maps, flattens, or chunks elements into new formats and structures using callback functions. ([source](http://www.dollarswift.org/))
- [Collection Filtering](https://awesome-repositories.com/f/data-databases/collection-filtering.md) — Creates new collections based on specific keys or by removing duplicate and empty values. ([source](http://www.dollarswift.org/))
- [Collection Groupings](https://awesome-repositories.com/f/data-databases/collection-groupings.md) — Organizes collection elements into dictionaries based on callback functions or frequency counts. ([source](https://www.dollarswift.org))
- [Dictionary Extraction and Cleaning](https://awesome-repositories.com/f/data-databases/data-dictionaries/dictionary-extraction-and-cleaning.md) — Extracts keys and values, merges dictionaries, or clones them while filtering specific keys. ([source](http://www.dollarswift.org/))
- [Dictionary Manipulation Utilities](https://awesome-repositories.com/f/data-databases/key-value-pair-managers/nested-dictionary-utilities/dictionary-manipulation-utilities.md) — Creates shallow clones of dictionaries by picking or omitting keys and merging multiple dictionaries. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Dictionary Key Management](https://awesome-repositories.com/f/data-databases/key-value-pair-managers/nested-dictionary-utilities/dictionary-manipulation-utilities/dictionary-inversion/dictionary-key-management.md) — Provides utilities to extract dictionary keys and values or create clones by picking specific keys. ([source](https://www.dollarswift.org))
- [Collection Restructuring](https://awesome-repositories.com/f/data-databases/array-chunking/collection-restructuring.md) — Reorganizes data into new formats such as chunks, flat lists, transposed matrices, or grouped dictionaries. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Predicate-Based Filtering](https://awesome-repositories.com/f/data-databases/array-element-modifiers/predicate-based-filtering.md) — Employs callback functions as predicates to isolate, search, and partition elements within arrays and dictionaries.
- [Array Set Operations](https://awesome-repositories.com/f/data-databases/array-set-operations.md) — Computes intersections, unions, and differences between multiple arrays to find unique or shared values. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Collection Property Plucking](https://awesome-repositories.com/f/data-databases/collection-property-plucking.md) — Extracts specific properties from every member of a collection into a new array. ([source](https://www.dollarswift.org))
- [Date and Time Libraries](https://awesome-repositories.com/f/data-databases/date-and-time-libraries.md) — Provides utilities for parsing, validating, and manipulating date and time values. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Date Object Creators](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/relative-date-generations/date-object-creators.md) — Provides utilities for generating date and time objects from Unix timestamps and relative helpers. ([source](https://www.dollarswift.org))
- [Collection Sum Calculators](https://awesome-repositories.com/f/data-databases/maximum-value-calculators/collection-sum-calculators.md) — Computes the minimum, maximum, or sum of values within a collection. ([source](https://www.dollarswift.org))
- [Ordered Collection Manipulations](https://awesome-repositories.com/f/data-databases/ordered-collection-management/ordered-collection-manipulations.md) — Shuffles elements, creates ranges, or retrieves subsets from the start or end of a collection. ([source](http://www.dollarswift.org/))
- [Text String Cleaning](https://awesome-repositories.com/f/data-databases/text-string-cleaning.md) — Provides tools for cleaning string data by removing whitespace and splitting text into arrays. ([source](http://www.dollarswift.org/))

### Programming Languages & Runtimes

- [Dictionary Merging](https://awesome-repositories.com/f/programming-languages-runtimes/dictionary-iteration/dictionary-construction-from-sequences/dictionary-merging.md) — Combines multiple dictionaries into one where newer values override previous ones for the same key. ([source](https://www.dollarswift.org))
- [Function Chaining](https://awesome-repositories.com/f/programming-languages-runtimes/function-chaining.md) — Implements function composition allowing the output of one function to feed as input into the next. ([source](https://www.dollarswift.org))
- [Function Currying](https://awesome-repositories.com/f/programming-languages-runtimes/function-currying.md) — Implements functional patterns for currying and partial application to fix specific function arguments. ([source](https://www.dollarswift.org))
- [Functional Utility Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/functional-utility-libraries.md) — Ships a collection of functional programming primitives and collection manipulation tools for Swift.
- [Generic Collection Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-definitions/generic-containers/generic-collection-utilities.md) — Extends Swift standard library types with generic methods for type-safe data transformation and aggregation.
- [Element Search](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-type-utilities/array-element-finding/predicate-based-element-testing/element-search.md) — Locates the first or last element, or the index of a value, that matches a condition. ([source](https://www.dollarswift.org))
- [Collection Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/function-utilities/api-wrappers/fluent-interface-wrappers/collection-wrappers.md) — Implements a fluent, chainable wrapper interface for applying sequential transformations to data collections.
- [Function Currying](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/functional/function-currying.md) — Implements function currying to transform functions to accept arguments individually through successive calls. ([source](http://www.dollarswift.org/))
- [Swift String Manipulation Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/swift-string-manipulation-libraries.md) — Offers a toolkit for sanitizing text and converting casing styles natively in Swift.
- [Swift String Processing Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/swift-string-processing-libraries.md) — Provides a comprehensive toolkit for sanitizing, formatting, and transforming text strings in Swift.
- [Function Invocation Control](https://awesome-repositories.com/f/programming-languages-runtimes/function-invocation-control.md) — Controls function execution flow using currying, composition, and execution limits. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Collection Intersections](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-type-utilities/collection-intersections.md) — Identifies intersections and common elements shared across multiple collections. ([source](https://www.dollarswift.org))
- [Unix Epoch Conversions](https://awesome-repositories.com/f/programming-languages-runtimes/unix-epoch-conversions.md) — Translates integer Unix timestamps and formatted strings into date objects.

### Software Engineering & Architecture

- [Function Execution Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/function-execution-wrappers.md) — Provides wrappers to control function invocation, including executing a function once or applying memoization. ([source](https://www.dollarswift.org))
- [Functional Programming](https://awesome-repositories.com/f/software-engineering-architecture/functional-programming.md) — Implements functional programming patterns including currying, memoization, and composition for Swift.
- [Functional Programming Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/functional-programming-wrappers.md) — Implements functional programming patterns such as currying, partial application, and memoization to control logic execution.
- [Function Composition](https://awesome-repositories.com/f/software-engineering-architecture/modular-program-composition/function-composition.md) — Provides tools for combining multiple independent functions into a single composite execution pipeline.
- [Collection Partitioning](https://awesome-repositories.com/f/software-engineering-architecture/sorting-algorithms/array-rearrangements/collection-partitioning.md) — Shuffles, chunks, or partitions array elements into groups based on size or callback functions. ([source](https://www.dollarswift.org))

### Part of an Awesome List

- [Regex Pattern Matching](https://awesome-repositories.com/f/awesome-lists/devtools/regex-and-pattern-matching/regex-pattern-matching.md) — Provides regular expression operations to match patterns and extract substrings from text. ([source](https://www.dollarswift.org))
- [Data Structures](https://awesome-repositories.com/f/awesome-lists/devtools/data-structures.md) — Functional tool-belt for Swift collections.
- [General Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/general-utilities.md) — Functional programming utilities similar to Lo-Dash.

### Development Tools & Productivity

- [Date and Time Utilities](https://awesome-repositories.com/f/development-tools-productivity/date-and-time-utilities.md) — Provides utility helpers for parsing Unix timestamps and calculating relative time offsets.
- [Regular Expression Utilities](https://awesome-repositories.com/f/development-tools-productivity/regular-expression-utilities.md) — Tests strings against patterns and extracts substrings using regular expression operations. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [String Case Transformers](https://awesome-repositories.com/f/development-tools-productivity/string-case-transformers.md) — Provides utilities for converting text between different naming conventions and sanitizing input.
- [Casing Formatters](https://awesome-repositories.com/f/development-tools-productivity/string-case-transformers/casing-formatters.md) — Converts strings between camelCase, kebab-case, snake_case, and Start Case formats. ([source](http://www.dollarswift.org/))

### Scientific & Mathematical Computing

- [Discrete Algorithm Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/discrete-algorithm-implementations.md) — Provides a set of discrete mathematical procedures for computing factorials, divisors, and random numeric sequences.
- [Discrete Math Utilities](https://awesome-repositories.com/f/scientific-mathematical-computing/discrete-math-utilities.md) — Computes factorials, greatest common divisors, least common multiples, and generates random numbers. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Discrete Math Utility Libraries](https://awesome-repositories.com/f/scientific-mathematical-computing/discrete-math-utility-libraries.md) — Implements mathematical procedures for computing factorials, divisors, and random numeric sequences.
- [GCD and LCM Calculators](https://awesome-repositories.com/f/scientific-mathematical-computing/greatest-common-divisor-algorithms/gcd-and-lcm-calculators.md) — Includes calculators for the greatest common divisor and least common multiple of integers. ([source](https://www.dollarswift.org))
- [Integer Mathematical Utilities](https://awesome-repositories.com/f/scientific-mathematical-computing/math-utility-primitives/integer-mathematical-utilities.md) — Provides calculations for factorials, divisors, and random integer generation.
- [Number Sequence Generation](https://awesome-repositories.com/f/scientific-mathematical-computing/number-sequence-generation.md) — Creates arrays of numbers based on defined ranges, specific increments, or arbitrary sequences. ([source](https://cdn.jsdelivr.net/gh/ankurp/dollar@main/README.md))
- [Numerical Sequence Generation](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-sequence-generation.md) — Generates arrays of numbers progressing from a start point to an end point. ([source](https://www.dollarswift.org))
