Skip to content

Commit 914d782

Browse files
authored
Make KeyPath functions/properties public.
1 parent 0db2135 commit 914d782

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/KeyPath.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import Foundation
55
/// Simple struct used to represent multiple segments of a string.
66
/// This is a utility used to recursively access values in nested dictionaries.
77
public struct KeyPath {
8-
var segments: [String]
8+
public var segments: [String]
99

10-
var isEmpty: Bool { return segments.isEmpty }
11-
var path: String {
10+
public var isEmpty: Bool { return segments.isEmpty }
11+
public var path: String {
1212
return segments.joined(separator: ".")
1313
}
1414

1515
/// Strips off the first segment and returns a pair
1616
/// consisting of the first segment and the remaining key path.
1717
/// Returns nil if the key path has no segments.
18-
func headAndTail() -> (head: String, tail: KeyPath)? {
18+
public func headAndTail() -> (head: String, tail: KeyPath)? {
1919
guard !isEmpty else { return nil }
2020
var tail = segments
2121
let head = tail.removeFirst()

0 commit comments

Comments
 (0)