Skip to content

Instantly share code, notes, and snippets.

@nathanclevenger
Last active September 29, 2022 15:17
Show Gist options
  • Save nathanclevenger/1c0d258d6acbcfa7ed27ea12ea277626 to your computer and use it in GitHub Desktop.
Save nathanclevenger/1c0d258d6acbcfa7ed27ea12ea277626 to your computer and use it in GitHub Desktop.
Simple API
import { api } from 'https://pkg.do/apis.do'
const myAPI = api(number = 5 => { number, squared: number^2, cubed: number^3 })
export default myAPI
import { apis, json } from 'https://pkg.do/apis.do'
export default {
fetch: () => json({apis})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment