import AsyncStorage from "@react-native-community/async-storage" ; returns { Promise . < boolean > } export async function RemoveStorageItem ( key ? ) { if ( ! key ) { return Promise . reject ( new Error ( "Input parameter 'Key' is required" ) ) ; } return removeItem ( key ) . then ( ( ) => true ) ; function removeItem ( key ) { if ( navigator && navigator . product === "ReactNative" ) { return AsyncStorage . removeItem ( key ) ; } if ( window ) { window . localStorage . removeItem ( key ) ; return Promise . resolve ( ) ; } return Promise . reject ( new Error ( "No storage API available" ) ) ; } }