Go to file
Zach Eriksen 8eefc65bf8
Merge pull request #3 from 0xLeif/develop
Develop
2021-03-14 13:10:28 -05:00
.swiftpm/xcode/package.xcworkspace Initial Commit 2021-03-11 16:43:53 -06:00
Sources/WTV Updated variable search and output 2021-03-13 12:41:49 -06:00
Tests Added more values to Test objects 2021-03-13 12:42:15 -06:00
.gitignore Initial Commit 2021-03-11 16:43:53 -06:00
LICENSE Create LICENSE 2021-03-12 08:48:26 -06:00
Package.swift Initial Commit 2021-03-11 16:43:53 -06:00
README.md Initial POC 2021-03-12 08:44:23 -06:00

README.md

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)