UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

10 lines (7 loc) 291 B
'use strict'; export function hasSuffix(value: unknown): value is string { return typeof value === 'string' && isNaN(parseInt(value[value.length - 1])); } export function maybeAddSuffix(value: unknown, suffix: string) { return hasSuffix(value) ? value : `${String(value)}${suffix}`; }