Swiftpack.co - mhkashizadeh/Swift-Xtension as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by mhkashizadeh.
mhkashizadeh/Swift-Xtension 0.2.1
Helpful swift extensions
⭐️ 0
🕓 2 weeks ago
.package(url: "https://github.com/mhkashizadeh/Swift-Xtension.git", from: "0.2.1")

Swift GitHub branch checks state Swift codecov GitHub tag (latest SemVer) GitHub

Xtension

Xtension is a collection of native Swift extensions

Extension

String
  • Case Converter
    • UpperCamelCase "hello world".upperCamelCased
    • lowerCamelCase "hello world".lowerCamelCased
    • lower_snake_case "hello world".lowerSnakeCased
    • UPPER_SNAKE_CASE "hello world".upperSnakeCased
    • kebeb-case "hello world".kebabCased
  • Validation
    • Regex "hello world".validate(pattern: #"(\w)\s(\w)"#)
    • Alphabet "hello world".validate(pattern: .alphabet)
    • Sentence "hello world".validate(pattern: .sentence)
    • Alphanumeric "hello world".validate(pattern: .alphanumeric)
    • Email "mail@example.com".validate(pattern: .email)
    • Url "http://www.example.com".validate(pattern: .url)

Installation

Swift Package Manager

Add the following code to your Package.swift :

dependencies: [
    .package(url: "https://github.com/mhkashizadeh/Swift-Xtension.git", from: "0.1.5")
],
targets: {
    .target(name: "YourTarget", dependencies: ["Swift-Xtension"])
}

Usage

Just import

import Xtension

Tests

Tests can be found here.

Run them with

swift test

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

0.2.1
2 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics