ES6 Plato on Github
Report Home
Summary Display
gva-client.mjs
Maintainability
81.00
Lines of code
13
Difficulty
16.33
Estimated Errors
0.09
Function weight
By Complexity
By SLOC
import {fetch} from './context-dependant/generics.mjs'; export function GvaClient(hosts) { const self = this; self.hosts = hosts; self.query = queryStr => query(self, queryStr); return self; } async function query(self, queryStr) { return (await fetch(self.hosts[0], {method: 'POST', body: queryStr})).json(); }