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
🕓 1 year 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 "[email protected]".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: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.2.1
1 year ago

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