react-native-sensitive-info icon indicating copy to clipboard operation
react-native-sensitive-info copied to clipboard

make options not required

Open artola opened this issue 4 years ago • 2 comments

Passing options in all the methods should be optional, nowadays it is required to pass an empty object. At present the keys are optional, while probably they have a fallback value in the implementation (e.g., app for keychainService).

Same for master than keystore branch.

// ok
const gettingFirstData = await SInfo.getItem('key1', {
    sharedPreferencesName: 'mySharedPrefs',
    keychainService: 'myKeychain'
});
// ok
const gettingFirstData = await SInfo.getItem('key1', {});
// not allowed
const gettingFirstData = await SInfo.getItem('key1');

See: https://github.com/mCodex/react-native-sensitive-info/blob/1575f8992ff7113443199bce5a3fb1e11392878d/index.d.ts#L32

artola avatar Feb 11 '21 15:02 artola

@artola thanks for your suggestion

mCodex avatar Feb 28 '21 13:02 mCodex

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 30 '21 20:03 stale[bot]