@stareezy-ui/core
v0.2.4
Published
Stareezy UI shared types, platform utilities, hooks, and ported rekosistem-components utilities
Maintainers
Readme
@stareezy-ui/core
Shared utilities, hooks, and platform helpers for Stareezy UI.
Install
pnpm add @stareezy-ui/coreUtilities
import {
// Guards
isEmptyList,
isEmptyString,
isUndefinied,
isZero,
// String
textToUppercaseSubstring,
// Date
formatDate,
formatDateWithYear,
formatDateWithYearHours,
formatDateWithMonth,
getTodayDate,
generateDaysBeforeDate,
// Currency
formatToRupiah,
// Spacing
convertSpacing,
// Weeks
isoWeeks,
} from "@stareezy-ui/core";
formatToRupiah(1000000); // "Rp 1.000.000"
formatToRupiah(1000000, true); // "1.000.000"
convertSpacing(16); // 16 on web, ms(16) on RNHooks
import { useDeviceLayout } from "@stareezy-ui/core";
function MyComponent() {
const { width, height, isSmall } = useDeviceLayout();
// ...
}License
MIT
