0.2.0 • Published 5 months ago
@frfla/laser v0.2.0
LASER
Straightforward Javascript/TypeScript Utilities
npm install @frfla/laser
yarn add @frfla/laser
pnpm add @frfla/laserArray
type NotEmptyArray<T>A utility type that represents an array guaranteed to have at least onetype LastOf<T>A utility type that represents the last element of arraytype FirstOf<T>A utility type that represents the first element of array
Function
noop()A function that performs no actionasyncNoop()A function that returns a Promise which resolves immediately and performs no actiontype NaryFnA utility type that represents a function taking exactly N parameter(s). (1 <= N <= 3).
Object
objectKeys()Typed wrapper around Object.keys that preserves the key typesobjectEntries()Typed wrapper around Object.entries that preserves key‑value types
Storage
type SerializableA utility type that represents serializable thing
Runtime
isServer()Indicates whether the current execution context is a server environmentisClient()Indicates whether the current execution context is a browser (client) environment