File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,22 @@ Person.where({ name: 'Joe' }).page(2).per(10).sort('name').then((people) => {
35
35
});
36
36
```
37
37
38
+ ### Fetch
39
+
40
+ Depending on your requirements, you may need a ` fetch ` polyfill for use
41
+ in legacy browsers or NodeJS. There are a variety of polyfills and ways
42
+ to install, so implementation is up to you. Here are two recommendations:
43
+
44
+ ``` js
45
+ // node
46
+ require (' isomorphic-fetch' )
47
+ ```
48
+
49
+ ``` js
50
+ // browser
51
+ import ' whatwg-fetch'
52
+ ```
53
+
38
54
### JSON Web Tokens
39
55
40
56
jsorm supports setting a JWT and using it for all requests. Set it
Original file line number Diff line number Diff line change 26
26
"chai-as-promised" : " ^6.0.0" ,
27
27
"chai-things" : " ^0.2.0" ,
28
28
"fetch-mock" : " ^5.10.0" ,
29
+ "isomorphic-fetch" : " ^2.2.1" ,
29
30
"lodash.clonedeep" : " ^4.5.0" ,
30
31
"lodash.snakecase" : " ^4.1.1" ,
31
32
"mocha" : " ^3.2.0" ,
38
39
},
39
40
"dependencies" : {
40
41
"es6-promise" : " ^4.0.5" ,
41
- "isomorphic-fetch" : " ^2.2.1" ,
42
42
"lodash-es" : " ^4.17.4"
43
43
}
44
44
}
Original file line number Diff line number Diff line change 1
1
/// <reference path="./index.d.ts" />
2
2
3
- import 'es6-promise' ;
4
- import 'isomorphic-fetch' ;
3
+ import * as es6Promise from 'es6-promise' ;
4
+ es6Promise . polyfill ( ) ;
5
5
6
6
import patchExtends from './custom-extend' ;
7
7
patchExtends ( ) ;
You can’t perform that action at this time.
0 commit comments