Files
linguist/samples/JavaScript/axios.es
John Gardner 24b368a30c Add ".es" to recognised ECMAScript extensions
* Add ".es" to recognised JavaScript extensions
* Add heuristic to differentiate Erlang from ECMAScript
* Add test-case for .es heuristic
2016-03-29 13:36:13 -06:00

14 lines
285 B
JavaScript

import axios from "axios";
export default {
async getIndex(prefix) {
const {data} = await axios.get((prefix || "") + "/index.json");
return data;
},
async getContent(path, prefix) {
const {data} = await axios.get((prefix || "") + "/" + path + ".json");
return data;
}
}