badgen.net/libs/live-fns/runkit.js

11 wiersze
355 B
JavaScript

const axios = require('../axios.js')
module.exports = async function (account, notebook, ...args) {
const endpoint = `https://runkit.io/${account}/${notebook}/branches/master?args=${args.join('/')}`
const { subject, status, color } = await axios(endpoint).then(res => res.data)
if (subject && status) {
return { subject, status, color }
}
}