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) => {
3535});
3636```
3737
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+
3854### JSON Web Tokens
3955
4056jsorm supports setting a JWT and using it for all requests. Set it
Original file line number Diff line number Diff line change 2626 "chai-as-promised" : " ^6.0.0" ,
2727 "chai-things" : " ^0.2.0" ,
2828 "fetch-mock" : " ^5.10.0" ,
29+ "isomorphic-fetch" : " ^2.2.1" ,
2930 "lodash.clonedeep" : " ^4.5.0" ,
3031 "lodash.snakecase" : " ^4.1.1" ,
3132 "mocha" : " ^3.2.0" ,
3839 },
3940 "dependencies" : {
4041 "es6-promise" : " ^4.0.5" ,
41- "isomorphic-fetch" : " ^2.2.1" ,
4242 "lodash-es" : " ^4.17.4"
4343 }
4444}
Original file line number Diff line number Diff line change 11/// <reference path="./index.d.ts" />
22
3- import 'es6-promise' ;
4- import 'isomorphic-fetch' ;
3+ import * as es6Promise from 'es6-promise' ;
4+ es6Promise . polyfill ( ) ;
55
66import patchExtends from './custom-extend' ;
77patchExtends ( ) ;
You can’t perform that action at this time.
0 commit comments