UNPKG

@attio/react-native-bottom-sheet-toolbox

Version:
7 lines (5 loc) 149 B
export function getPercentageValue(v: string) { "worklet" if (v.at(-1) !== "%") return null return parseInt(v.slice(0, -1), 10) / 100 }