# All files / lib/server config.js

88.89% Statements 8/9
100% Branches 0/0
75% Functions 3/4
88.89% Lines 8/9

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31

    1x

    1x
    19x

    6x

    10x

    1x

    1x

    1x'use strict';

    Object.defineProperty(exports, "__esModule", {
      value: true
    });

    exports.default = function (getIpfs, opts) {
      return {
        set: (0, _postmsgRpc.expose)('ipfs.config.set', (0, _prepost.pre)((0, _buffer.preBufferFromJson)(1), opts.pre['config.set'], function () {
          var _getIpfs$config;

          return (_getIpfs$config = getIpfs().config).set.apply(_getIpfs$config, arguments);
        }), opts),
        get: (0, _postmsgRpc.expose)('ipfs.config.get', (0, _prepost.pre)(opts.pre['config.get'], function () {
          var _getIpfs$config2;

          return (_getIpfs$config2 = getIpfs().config).get.apply(_getIpfs$config2, arguments);
        }), opts),
        replace: (0, _postmsgRpc.expose)('ipfs.config.replace', (0, _prepost.pre)(opts.pre['config.replace'], function () {
          var _getIpfs$config3;

          return (_getIpfs$config3 = getIpfs().config).set.apply(_getIpfs$config3, arguments);
        }), opts)
      };
    };

    var _postmsgRpc = require('postmsg-rpc');

    var _prepost = require('prepost');

    var _buffer = require('../serialization/buffer');