Skip to content

storageRatio — @gj-kit/format

A public function from @gj-kit/format. The signature below is taken directly from the 0.1.1 release declaration.

import { storageRatio } from '@gj-kit/format';
/** Usage as a 0-1 fraction, or null when the limit is missing/zero/invalid.
* Arithmetic, not rendering — pair it with {@link formatPercent}. */
declare function storageRatio(used: number | null | undefined, limit: number | null | undefined): number | null;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/format
  • Version: 0.1.1
  • Public entry: .
  • Source: GitHub