mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 06:20:38 -07:00
feat: with & for in render tag, closes #195
This commit is contained in:
@@ -123,3 +123,7 @@ export function changeCase (str: string): string {
|
||||
const hasLowerCase = [...str].some(ch => ch >= 'a' && ch <= 'z')
|
||||
return hasLowerCase ? str.toUpperCase() : str.toLowerCase()
|
||||
}
|
||||
|
||||
export function ellipsis (str: string, N: number): string {
|
||||
return str.length > N ? str.substr(0, N - 3) + '...' : str
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user