This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { toClj } from 'mori'; | |
async function getUser() { | |
// fetch json data from our API | |
const user = await fetch('http://api.com/user'); | |
const userJson = await user.json(); | |
// convert the object into a clojure's hashMap | |
return toClj(userJson); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { toClj } from 'mori'; | |
async function getUser() { | |
// fetch json data from our API | |
const user = await fetch('http://api.com/user'); | |
const userJson = await user.json(); | |
// convert the object into a clojure's hashMap | |
return toClj(userJson); | |
} |
NewerOlder