Skip to content

kaascevich/Rapid

Repository files navigation

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. Dunno when they fixed it, but they did! You can find it here.

About

A host of utilities to make Swift Swiftier

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages