mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
* chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks
21 lines
666 B
TypeScript
21 lines
666 B
TypeScript
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
|
|
|
|
/**
|
|
* Utility functions for style, design, and layout operations.
|
|
*/
|
|
|
|
/**
|
|
* Normalizes borderWidth value.
|
|
* Validates and converts borderWidth to a non-negative number or undefined.
|
|
* @param borderWidth - The borderWidth value to normalize
|
|
* @returns Normalized borderWidth (non-negative number) or undefined
|
|
*/
|
|
export function normalizeBorderWidth(borderWidth: unknown): number | undefined {
|
|
if (typeof borderWidth === 'number' && borderWidth >= 0) {
|
|
return borderWidth;
|
|
}
|
|
return undefined;
|
|
}
|