Installation
@almighty-shogun/utils ships as ESM and exposes named exports from the package root. Luxon is a direct dependency, so it is installed automatically. Add it to your own package.json as well when application code constructs DateTime or Duration values to pass into the date helpers.
Install
sh
bun add @almighty-shogun/utils luxonsh
npm install @almighty-shogun/utils luxonsh
pnpm add @almighty-shogun/utils luxonsh
yarn add @almighty-shogun/utils luxonImporting
All public APIs are available from the package root.
ts
import {
formatDate,
getToday,
setDarkTheme
} from '@almighty-shogun/utils';Requirements
- Luxon 3.x for date and duration helpers, resolved through the package dependency. Luxon ships no type declarations of its own, so
@types/luxonis a dependency too and its types resolve without extra setup. - A browser environment for DOM helpers such as
reload,scrollToTop, anddisableZoom.