# All files / lib/client pin.js

100% Statements 10/10
75% Branches 3/4
100% Functions 2/2
100% Lines 10/10

    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

    1x

    1x
    19x

    1x

    1x

    1x

    1x

    1x

    1x

    1x'use strict';

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

    exports.default = function (opts) {
      return {
        add: _callbackify2.default.variadic((0, _prepost.pre)((0, _buffer.preBufferToJson)(0), (0, _cid.preCidToJson)(0), (0, _postmsgRpc.caller)('ipfs.pin.add', opts))),
        rm: _callbackify2.default.variadic((0, _prepost.pre)((0, _buffer.preBufferToJson)(0), (0, _cid.preCidToJson)(0), (0, _postmsgRpc.caller)('ipfs.pin.rm', opts))),
        ls: _callbackify2.default.variadic((0, _prepost.pre)((0, _buffer.preBufferToJson)(0), (0, _cid.preCidToJson)(0), (0, _postmsgRpc.caller)('ipfs.pin.ls', opts)))
      };
    };

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

    var _callbackify = require('callbackify');

    var _callbackify2 = _interopRequireDefault(_callbackify);

    var _prepost = require('prepost');

    var _cid = require('../serialization/cid');

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

    function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }