TrieRouter

An App-specific Simple Routing Library

Usage

let r = Router()
r.addRoute("tbx://index") { _ in
    print("root")
}
r.addRoute("tbx://intTest/:value") { ctx in
    let v = try ctx.params.getInt("value")
    print("hello \(v)")
}
r.addRoute("tbx://file/:name") { ctx in
    print("file \(ctx.params["name"] ?? "")")
}
r.addRoute("tbx://long/long/:name/path") { ctx in
    print("hello \(ctx.params["name"] ?? "")")
}

Requirements

Swift, iOS 9.0+, maxOS 10.10+

Installation

FlexLayout is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'TrieRouter'

Author

tbxark, [email protected]

License

FlexLayout is available under the MIT license. See the LICENSE file for more info.