npm.io
1.1.2 • Published 2 years ago

@linvix-sistemas/react-native-get-values

Licence
MIT
Version
1.1.2
Deps
0
Size
18 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

@linvix-sistemas/react-native-get-values

Get info.plist or values/strings.xml values for react native.

Remember to add the key you want to recover in the info.plist file on iOS and in res/values/strings.xml on Android.

Installation

yarn add @linvix-sistemas/react-native-get-values

Usage

import { getKeyValue } from '@linvix-sistemas/react-native-get-values';

const result = await getKeyValue('your_key');

Typescript Override avaliable Keys

Create declaration (d.ts) a file with your avaliable keys.

declare module '@linvix-sistemas/react-native-get-values' {
    type AvailableKeys = 'KEY1' | 'KEY2' | 'KEY3';
    export function getKeyValue(key: AvailableKeys): Promise<string>;
}

License

MIT

Keywords