mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
4f20362b07
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49303 Changelog: [General][Breaking] Deep imports to modules inside `Libraries/StyleSheet` using `require` may need to be appended with `.default` Reviewed By: huntie Differential Revision: D69400980 fbshipit-source-id: 053f40a8677ac877b93c27e87422ea0ef540c272
31 lines
687 B
JavaScript
31 lines
687 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict-local
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {____FontVariantArray_Internal} from './StyleSheetTypes';
|
|
|
|
function processFontVariant(
|
|
fontVariant: ____FontVariantArray_Internal | string,
|
|
): ?____FontVariantArray_Internal {
|
|
if (Array.isArray(fontVariant)) {
|
|
return fontVariant;
|
|
}
|
|
|
|
// $FlowFixMe[incompatible-type]
|
|
const match: ?____FontVariantArray_Internal = fontVariant
|
|
.split(' ')
|
|
.filter(Boolean);
|
|
|
|
return match;
|
|
}
|
|
|
|
export default processFontVariant;
|