3 Object.defineProperty(exports, '__esModule', {
6 exports.test = exports.serialize = undefined;
8 var _markup = require('./lib/markup');
11 * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
13 * This source code is licensed under the MIT license found in the
14 * LICENSE file in the root directory of this source tree.
19 const testSymbol = Symbol.for('react.test.json');
21 const getPropKeys = object => {
22 const props = object.props;
26 .filter(key => props[key] !== undefined)
31 const serialize = (exports.serialize = (
39 ++depth > config.maxDepth
40 ? (0, _markup.printElementAsLeaf)(object.type, config)
41 : (0, _markup.printElement)(
44 ? (0, _markup.printProps)(
46 // Despite ternary expression, Flow 0.51.0 found incorrect error:
47 // undefined is incompatible with the expected param type of Object
51 indentation + config.indent,
58 ? (0, _markup.printChildren)(
61 indentation + config.indent,
71 const test = (exports.test = val => val && val.$$typeof === testSymbol);
73 exports.default = {serialize: serialize, test: test};