Rapid

2.3.0

A host of utilities to make Swift Swiftier
kaascevich/Rapid

What's New

Rapid 2.3.0

2023-09-02T00:57:52Z
  • Added appendInterpolation(_:format:) and appendInterpolation(_:if:) string interpolation methods
  • SetAlgebra now has +, +=, -, and -= operators
  • Added ~= operators for Error and KeyPath
  • Added sorted(by:) and sorted(by:using:) methods to Sequence
  • The package previously did not build on anything other than macOS. This has hopefully been fixed.

Full Changelog: v2.2.0...v2.3.0

Rapid

Swift Compatibility Platform Compatibility

A host of utilities to make Swift Swiftier.

What's this about?

Rapid is a package containing many of the most common extensions to the standard library (and, occasionally, other frameworks).

Within Rapid, you will find:

  • Operators for the most commonly used features, such as § to create String representations
  • Unicode versions of built-in operators, such as instead of !=
  • Property wrappers, such as @Transformed or @Clamped
  • Global constants for commonly used values, such as π for Double.pi
  • Computed properties to simplify common comparisons, such as isNil or isNotEmpty
  • Inverted versions of methods, such as last(where:) or noneSatisfy(_:)
  • Syntactic sugar for working on specific values, such as configure(_:_:) or run(with:do:)
  • Methods and subscripts that return nil instead of crashing when invalid arguments are passed
  • And more...

Using Rapid

Using in a Swift package

  1. Add Rapid to your package manifest:

    .package(
        url: "https://github.com/kaascevich/Rapid.git",
        branch: "main"
    )
  2. Add Rapid as a dependency for each of your targets:

    .product(
        name: "Rapid",
        package: "Rapid"
    )

Using in an Xcode project

  1. Choose FileAdd Package Dependencies...
  2. Copy this link, and paste it into the search bar.
  3. Click Add Package.
  4. Choose the target you want to add Rapid to, and then click Add Package again.

Documentation?

I've documented everything to the best of my ability. However, due to an issue with the Swift Package Index, you'll need to build it yourself for now.

To do that:

  1. Open Xcode, and choose IntegrateClone... (or Source ControlClone... on Xcode 14 or earlier).
  2. Copy this link, paste it into the search bar, and click Clone.
  3. Once Xcode completes package resolution, choose ProductBuild Documentation or hit ⌃⇧⌘D.
  4. Wait for the build to finish. When it's done, the documentation window will open.
  5. At the very top of the sidebar, expand Rapid, and then expand the Rapid under that.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Thu Oct 17 2024 16:09:06 GMT-0900 (Hawaii-Aleutian Daylight Time)