Merge branch 'main' of https://github.com/haideralipunjabi/social-app into main
This commit is contained in:
commit
40752982da
6 changed files with 64 additions and 5 deletions
|
@ -147,3 +147,4 @@ export const HITSLOP_10 = createHitslop(10)
|
|||
export const HITSLOP_20 = createHitslop(20)
|
||||
export const HITSLOP_30 = createHitslop(30)
|
||||
export const BACK_HITSLOP = HITSLOP_30
|
||||
export const MAX_POST_LINES = 25
|
||||
|
|
|
@ -32,3 +32,8 @@ export function toHashCode(str: string, seed = 0): number {
|
|||
|
||||
return 4294967296 * (2097151 & h2) + (h1 >>> 0)
|
||||
}
|
||||
|
||||
export function countLines(str: string | undefined): number {
|
||||
if (!str) return 0
|
||||
return str.match(/\n/g)?.length ?? 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue