Skip to content

Commit

Permalink
Rename stringToSwiftIdentifier to swiftIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed May 26, 2017
1 parent 01f00e8 commit c2775c3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Sources/Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public extension Extension {
registerTag("macro", parser: MacroNode.parse)
registerTag("call", parser: CallNode.parse)
registerTag("map", parser: MapNode.parse)
registerFilter("swiftIdentifier", filter: Filters.Strings.stringToSwiftIdentifier)
registerFilter("swiftIdentifier", filter: Filters.Strings.swiftIdentifier)
registerFilter("lowerFirstWord", filter: Filters.Strings.lowerFirstWord)
registerFilter("snakeToCamelCase", filter: Filters.Strings.snakeToCamelCase)
registerFilter("camelToSnakeCase", filter: Filters.Strings.camelToSnakeCase)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Filters+Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ extension Filters {
"right", "set", "Type", "unowned", "weak", "willSet"
]

static func stringToSwiftIdentifier(value: Any?) throws -> Any? {
static func swiftIdentifier(_ value: Any?) throws -> Any? {
guard let value = value as? String else { throw Filters.Error.invalidInputType }
return swiftIdentifier(from: value, replaceWithUnderscores: true)
return StencilSwiftKit.swiftIdentifier(from: value, replaceWithUnderscores: true)
}

/* - If the string starts with only one uppercase letter, lowercase that first letter
Expand Down

0 comments on commit c2775c3

Please sign in to comment.