Skip to content

New Module Export Format

Compare
Choose a tag to compare
@Vijar Vijar released this 27 Aug 23:19
· 588 commits to main since this release

Fetchr now exports a function that returns the Fetchr class. This allows the Fetcher class to be instantiated per each request so that the request object can be passed into the CRUD methods on registered data fetchers (aka API callers).

Fetcher was implemented as a singleton before this breaking change.

var fetchr = require('fetchr')

now becomes

var Fetchr = require('fetchr')();
var fetchr = new Fetchr();