11import React from 'react' ;
2- import { NativeModules , Platform } from 'react-native' ;
2+ import { NativeModules , Platform } from 'react-native' ;
33const invariant = require ( 'invariant' ) ;
44const RNCookieManagerIOS = NativeModules . RNCookieManagerIOS ;
55const RNCookieManagerAndroid = NativeModules . RNCookieManagerAndroid ;
@@ -8,17 +8,17 @@ let CookieManager;
88
99if ( Platform . OS === 'ios' ) {
1010 invariant ( RNCookieManagerIOS ,
11- 'Add RNCookieMangerIOS.h and RNCookieManagerIOS.m to your Xcode project' ) ;
11+ 'react-native-cookies: Add RNCookieMangerIOS.h and RNCookieManagerIOS.m to your Xcode project' ) ;
1212 CookieManager = RNCookieManagerIOS ;
1313} else if ( Platform . OS === 'android' ) {
14- invariant ( RNCookieManagerAndroid ,
15- 'Import libraries to android "rnpm link"' ) ;
14+ invariant ( RNCookieManagerAndroid ,
15+ 'react-native-cookies: Import libraries to android "react-native link react-native-cookies "' ) ;
1616 CookieManager = RNCookieManagerAndroid ;
1717} else {
18- invariant ( CookieManager , 'Invalid platform. This library only supports Android and iOS.' ) ;
18+ invariant ( CookieManager , 'react-native-cookies: Invalid platform. This library only supports Android and iOS.' ) ;
1919}
2020
21- var functions = [
21+ const functions = [
2222 'set' ,
2323 'setFromResponse' ,
2424 'getFromResponse' ,
@@ -29,6 +29,6 @@ var functions = [
2929] ;
3030
3131module . exports = { }
32- for ( var i = 0 ; i < functions . length ; i ++ ) {
32+ for ( var i = 0 ; i < functions . length ; i ++ ) {
3333 module . exports [ functions [ i ] ] = CookieManager [ functions [ i ] ] ;
34- }
34+ }
0 commit comments