Skip to content

Commit

Permalink
fix: sprigin camelcase needs to be the same (bugged) return (#55)
Browse files Browse the repository at this point in the history
## Description
In sprig, `camelcase` return a pascalcase. In Sprout we have both
functions but as `sprigin` must be a no-breaking replacement,
`camelcase` needs to still be "bugged" 😢

## Changes
- Use alias to provide backward compatibility

## Checklist
- [x] I have read the **CONTRIBUTING.md** document.
- [x] My code follows the code style of this project.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] I have updated the documentation accordingly.
- [ ] This change requires a change to the documentation on the website.
  • Loading branch information
42atomys authored Aug 16, 2024
1 parent d4f1d68 commit cb7cf6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sprigin/sprig_backward_compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var bc_registerSprigFuncs = sprout.FunctionAliasMap{
"add1": []string{"add1f"}, //! Deprecated: Should use add1 instead
"sub": []string{"subf"}, //! Deprecated: Should use sub instead
"toTitleCase": []string{"title", "titlecase"}, //! Deprecated: Should use toTitleCase instead
"toCamelCase": []string{"camel", "camelcase"}, //! Deprecated: Should use toCamelCase instead
"toPascalCase": []string{"camelcase"}, //! Deprecated: Should use toPascalCase instead
"toSnakeCase": []string{"snake", "snakecase"}, //! Deprecated: Should use toSnakeCase instead
"toKebabCase": []string{"kebab", "kebabcase"}, //! Deprecated: Should use toKebabCase instead
"swapCase": []string{"swapcase"}, //! Deprecated: Should use swapCase instead
Expand Down

0 comments on commit cb7cf6f

Please sign in to comment.