UNPKG

cachios

Version:

Simple axios cache wrapper using node-cache

14 lines (10 loc) 384 B
var axios = require('axios'); var Cachios = require('./cachios'); var instance = new Cachios(axios); // allow for similar axios syntax instance.create = function create(axiosInstance, nodeCacheConf) { return new Cachios(axiosInstance, nodeCacheConf); }; module.exports = instance; // better `import cachios from 'cachios';` typescript support: module.exports.default = instance;