UNPKG

@juice789/tf2items

Version:
25 lines (14 loc) 610 B
option 1: call the sagas anywhere your redux-saga app + add the api context from the api.js const { fetchAppDataInventory } = require('@juice789/tf2items') function* fetchAppDataINvnetorySaga(inventory){ const fetched = yield call(fetchAppDataINventry, inventory) } function* fetchInventorySaga(){ yielt takeEvery('FETCH_INVENTORY', fetchAppDataInventorySaga) } option 2: initialize the library as a module, functions are available as promises const { getInstance } = require('@juice789/tf2items') const app = getInstance(options) app.saveSchema().then(console.log)