Introduce createTablePlugin
Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well Reviewed By: jknoxville Differential Revision: D28031227 fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cf2405a466
commit
05bf55419f
18
desktop/flipper-plugin/src/utils/toFirstUpper.tsx
Normal file
18
desktop/flipper-plugin/src/utils/toFirstUpper.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function toFirstUpper(name: string): string {
|
||||
if (!name) {
|
||||
return name;
|
||||
}
|
||||
if (name.length === 1) {
|
||||
return name.toUpperCase();
|
||||
}
|
||||
return name[0].toUpperCase() + name.substr(1);
|
||||
}
|
||||
Reference in New Issue
Block a user