"use strict";

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

var _operators = require("rxjs/operators");

var _drr = require("../util/drr");

var _info = require("./info");

// Copyright 2017-2019 @polkadot/api-derive authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
function eraLength(api) {
  return () => (0, _info.info)(api)().pipe((0, _operators.map)((_ref) => {
    let {
      eraLength
    } = _ref;
    return eraLength;
  }), (0, _drr.drr)());
}