UNPKG

pokemon.js

Version:

A JavaScript library that makes interacting with PokeAPI easier

10 lines (9 loc) 294 B
const fetch = require('../../fetch/get/get'); const BASE_URL = "https://pogoapi.net/api/v1/" /** * @param {String} data * @returns {Promise<*>} */ module.exports = async function get(data) { let response = await fetch(`${BASE_URL}${data}`); return await response.json(); }