code: function wrap(value, callback) {
    return Promise.resolve(value).then(
      obj => {
        if (callback) {
          callback(null, obj);
        }
        return obj;
      },
      err => {
        if (callback) {
          callback(err);
        }
        throw err;
      }
    );
  }
docs: https://github.com/facebook/react-native/blob/master/Libraries/Storage/AsyncStorage.js