Skip to content

@preflower/utils

General purpose TypeScript utilities for daily development.

Installation

bash
pnpm add @preflower/utils

Utilities Index

Array

Date

  • format: Lightweight date formatting without dependencies.

Device

  • isIOS: Detect if the device is iOS.

Function

Object

  • defineMap: Transform lists into typed maps or extracted arrays.
  • toRawType: Get the underlying JS type string.
  • pick: Create a new object with selected properties.

Screen

Storage

  • storage: Typed wrappers for localStorage and sessionStorage.

Released under the ISC License.