UNPKG

826 BJavaScriptView Raw
1/*!
2 * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3 */
4
5import util from 'util';
6
7import AmpState from 'ampersand-state';
8
9/**
10 * WebexInternalCore is an extra layer of nesting to make it blatantly clear that
11 * private plugins are, in fact, private.
12 * @class
13 */
14const WebexInternalCore = AmpState.extend({
15 derived: {
16 ready: {
17 deps: [],
18 fn() {
19 return Object.keys(this._children).reduce((ready, name) => ready && this[name] && this[name].ready !== false, true);
20 }
21 }
22 },
23
24 /**
25 * @instance
26 * @memberof WebexPlugin
27 * @param {number} depth
28 * @private
29 * @returns {Object}
30 */
31 inspect(depth) {
32 return util.inspect(this.serialize({
33 props: true,
34 session: true,
35 derived: true
36 }), {depth});
37 }
38});
39
40export default WebexInternalCore;