@@ -30,7 +30,6 @@ static getItem(key: string, [callback]: ?(error: ?Error, result: ?string) => voi
3030**Example**: 
3131
3232` ` ` js 
33- 
3433getMyStringValue  =  async  () =>  {
3534  try  {
3635    return  await  AsyncStorage .getItem (' @key' 
@@ -39,12 +38,10 @@ getMyStringValue = async () => {
3938  }
4039
4140  console .log (' Done.' 
42- 
4341}
4442` ` ` 
4543
4644` ` ` js 
47- 
4845getMyObject  =  async  () =>  {
4946  try  {
5047    const  jsonValue  =  await  AsyncStorage .getItem (' @key' 
@@ -54,7 +51,6 @@ getMyObject = async () => {
5451  }
5552
5653  console .log (' Done.' 
57- 
5854}
5955` ` ` 
6056
@@ -66,7 +62,7 @@ getMyObject = async () => {
6662
6763## `  setItem ` 
6864
69- Sets a string `  value `  for given ` key ` . This operation can either modify an existing entry, if it did exist for given ` key ` , or add new one otherwise.  
65+ Sets a string `  value `  for given ` key ` . This operation can either modify an existing entry, if it did exist for given ` key ` , or add new one otherwise.
7066
7167In order to store object value, you need to serialize it, e.g. using `  JSON .stringify ()` .
7268
@@ -87,7 +83,6 @@ static setItem(key: string, value: string, [callback]: ?(error: ?Error) => void)
8783**Example**: 
8884
8985` ` ` js 
90- 
9186setStringValue  =  async  (value ) =>  {
9287  try  {
9388    await  AsyncStorage .setItem (' key' 
@@ -100,7 +95,6 @@ setStringValue = async (value) => {
10095` ` ` 
10196
10297` ` ` js 
103- 
10498setObjectValue  =  async  (value ) =>  {
10599  try  {
106100    const  jsonValue  =  JSON .stringify (value)
@@ -121,7 +115,6 @@ setObjectValue = async (value) => {
121115## `  mergeItem ` 
122116
123117Merges an existing value stored under `  key ` , with new ` value ` , assuming both values are **stringified JSON**.
124- **NOTE**: This is not supported by all native implementations. 
125118
126119**Signature**: 
127120
@@ -180,7 +173,6 @@ mergeUsers = async () => {
180173    //  }
181174  }
182175}
183- 
184176` ` ` 
185177
186178<br /> 
@@ -242,7 +234,6 @@ static getAllKeys([callback]: ?(error: ?Error, keys: ?Array<string>) => void): P
242234**Example**: 
243235
244236` ` ` js 
245- 
246237getAllKeys  =  async  () =>  {
247238  let  keys =  []
248239  try  {
@@ -255,7 +246,6 @@ getAllKeys = async () => {
255246  //  example console.log result:
256247  //  ['@MyApp_user', '@MyApp_key']
257248}
258- 
259249` ` ` 
260250
261251<br /> 
@@ -281,7 +271,6 @@ static multiGet(keys: Array<string>, [callback]: ?(errors: ?Array<Error>, result
281271**Example**: 
282272
283273` ` ` js 
284- 
285274getMultiple  =  async  () =>  {
286275
287276  let  values
@@ -295,7 +284,6 @@ getMultiple = async () => {
295284  //  example console.log output:
296285  //  [ ['@MyApp_user', 'myUserValue'], ['@MyApp_key', 'myKeyValue'] ]
297286}
298- 
299287` ` ` 
300288
301289<br /> 
@@ -321,7 +309,6 @@ static multiSet(keyValuePairs: Array<Array<string>>, [callback]: ?(errors: ?Arra
321309**Example**: 
322310
323311` ` ` js 
324- 
325312multiSet  =  async  () =>  {
326313  const  firstPair  =  [" @MyApp_user" " value_1" 
327314  const  secondPair  =  [" @MyApp_key" " value_2" 
@@ -333,7 +320,6 @@ multiSet = async () => {
333320
334321  console .log (" Done." 
335322}
336- 
337323` ` ` 
338324
339325<br /> 
@@ -344,7 +330,6 @@ multiSet = async () => {
344330## `  multiMerge ` 
345331
346332Multiple merging of existing and new values in a batch. Assumes that values are *stringified JSON*. Once completed, invokes `  callback `  with errors (if any).
347- **NOTE**: This is not supported by all native implementations. 
348333
349334**Signature**: 
350335
@@ -430,7 +415,6 @@ mergeMultiple = async () => {
430415  //    ]
431416  //  ]
432417}
433- 
434418` ` ` 
435419
436420
@@ -501,7 +485,6 @@ clearAll = async () => {
501485
502486  console .log (' Done.' 
503487}
504- 
505488` ` ` 
506489
507490<!-- ------------------------ HOOKS ------------------------ --> 
0 commit comments