Latest 0.3.1
Homepage https://github.com/capnslipp/NilCoalescingAssignmentOperators
License Public Domain
Platforms ios 8.0, osx 10.9
Authors

NilCoalescingAssignmentOperators is Swift micro-library that provides two nil-coalescing/assignment-combo operators:

??=

lhs ??= rhs works like Ruby’s ||= operator:

  1. If lhs is non-nil, does nothing.
  2. If lhs is nil but rhs is non-nil, does the assignment: lhs = rhs
  3. If lhs & rhs are both nil, does nothing.

=??

lhs =?? rhs works similarly, but prefers the rhs over the lhs:

  1. If rhs is nil, does nothing.
  2. If rhs is non-nil, does the assignment: lhs = rhs
    • If lhs & rhs are both non-nil, still does the assignment.

Latest podspec

{
    "name": "NilCoalescingAssignmentOperators",
    "version": "0.3.1",
    "summary": "A Swift u00b5-Library for ??/= Combo Operators ??= and =??",
    "description": "A Swift micro-library that provides two nil-coalescing/assignment combo operators: ??= and =??",
    "homepage": "https://github.com/capnslipp/NilCoalescingAssignmentOperators",
    "license": {
        "type": "Public Domain",
        "file": "LICENSE"
    },
    "authors": {
        "capnslipp": "[email protected]"
    },
    "source": {
        "git": "https://github.com/capnslipp/NilCoalescingAssignmentOperators.git",
        "tag": "0.3.1"
    },
    "social_media_url": "https://twitter.com/capnslipp",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source_files": "Sources/**/*"
}

Pin It on Pinterest

Share This