kubo-rpc-client-esm-cjs
Version:
A client library for the Kubo RPC API
16 lines (14 loc) • 362 B
JavaScript
/* eslint-env browser */
import { Client } from './core.js'
/**
* Set default configuration and call create function with them
*
* @template T
* @param {import('../types').ConfigureFn<T>} fn
* @returns {import('../types').ConfigureFactory<T>}
*/
export const configure = (fn) => {
return (options) => {
return fn(new Client(options), options)
}
}