src/index.js
function set (key, value) {
  if (Array.isArray(key)) {
    const items = key.map(([key, value]) => [key, JSON.stringify(value)])
    return AsyncStorage.multiSet(items)
  }

  return AsyncStorage.setItem(key, JSON.stringify(value))
}
function set (key, value) {
  if (Array.isArray(key)) {
    const items = key.map(([key, value]) => [key, JSON.stringify(value)])
    return AsyncStorage.multiSet(items)
  }

  return AsyncStorage.setItem(key, JSON.stringify(value))
}
function set ( key , value ) { if ( Array . isArray ( key ) ) { const items = key . map ( ( [ key , value ] ) => [ key , JSON . stringify ( value ) ] ) return AsyncStorage . multiSet ( items ) } return AsyncStorage . setItem ( key , JSON . stringify ( value ) ) }
Persist a value to AsyncStorage.
Wrapper around setItem & multiSet.
@param {String, Array} key for value
@param {Any} value to persist
@returns {Promise}
Persist a value to AsyncStorage . Wrapper around setItem & multiSet .