proto-mvc
Version:
Classless extremely lite Prototypal JavaScript Framework, using MVC architectual pattern.
23 lines (19 loc) • 385 B
JavaScript
module.exports = function() {
return {
defaults: {
model: null
},
findOne(url, options) {
options = Object.assign({
method: 'GET',
mode: 'cors',
cache: 'default'
}, Object.assign({}, options));
return fetch(url, options).then((response) => {
return response.json();
});
},
findAll() {
}
}
};