UNPKG

562 BJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 *
8 * @format
9 */
10// flowlint ambiguous-object-type:error
11'use strict';
12
13function getComponentName(component) {
14 return component.displayName || component.name || 'Component';
15}
16
17function getContainerName(Component) {
18 return 'Relay(' + getComponentName(Component) + ')';
19}
20
21module.exports = {
22 getComponentName: getComponentName,
23 getContainerName: getContainerName
24};
\No newline at end of file