Swiftpack.co -  Package - 0xLet/WTV
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
0xLet/WTV
Where's The Variable?
.package(url: "https://github.com/0xLet/WTV.git", from: "0.1.1")

WTV

Where's The Variable?

struct Dictionary {
    var value = [
        "someValue": [
            "what...?": 999
        ]
    ]
}

struct Value {
    let somes = Dictionary()
}

struct RootValue {
    let child: Value = Value()
}

struct OuterValue {
    let root = RootValue()
}

func testExample() {
    guard let output = WTV(OuterValue()).variable(named: "what...?") else {
        XCTFail()
        return
    }
    
    print(output)
    
    XCTAssert(output.contains("FOUND"))
}

OuterValue - Inside: root - Inside: child - Inside: somes - Inside: value - Inside: someValue - Inside: someValue - Inside: what...? - FOUND: (label: Optional("what...?"), value: 999)

GitHub

link
Stars: 3
Last commit: 4 weeks ago

Related Packages

Release Notes

Support Arrays
4 weeks ago

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