Latest 1.0.2
Homepage https://github.com/OlehKulykov/Inlineswift
License MIT
Platforms ios 8.0, osx 10.10, watchos 2.0, tvos 9.0, requires ARC
Authors

CocoaPods
CocoaPods
Build Status

Inline Swift

Swift small functions for more stable and safer code.

Installation with CocoaPods

Podfile

pod 'Inlineswift'

Examples

NSDate+Operators.swift – comparison operators/relational operators

let now = NSDate()
let next = now.dateByAddingTimeInterval(1)

if now == next { // false
if now != next { // true
if now < next { // true
if now <= next { // true
if now > next { // false
if now >= next { // false

NSDate+MinMax.swift – Minimum and maximum date from the list e.g. earliest and latest

let now = NSDate()
let next = now.dateByAddingTimeInterval(1)
let prev = now.dateByAddingTimeInterval(-1)

min() // now date
min(now, next) // now date
min(now, next, prev) // prev date

max() // now date
max(now, prev) // now date
max(now, next, prev) // next date

License

The MIT License (MIT)

Copyright (c) 2015 – 2016 Kulykov Oleh info@resident.name

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Latest podspec

{
    "name": "Inlineswift",
    "version": "1.0.2",
    "summary": "Swift small functions and extensions",
    "description": "Swift small functions and extensions. Few usefull daily functions.",
    "homepage": "https://github.com/OlehKulykov/Inlineswift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Oleh Kulykov": "info@resident.name"
    },
    "source": {
        "git": "https://github.com/OlehKulykov/Inlineswift.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source_files": "*.{swift}",
    "requires_arc": true
}

Pin It on Pinterest

Share This