Straightforward Javascript/TypeScript Utilities
npm install @frfla/laser
yarn add @frfla/laser
pnpm add @frfla/laser
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
noop()A function that performs no actionasyncNoop()A function that returns a Promise which resolves immediately and performs no actiontype NaryFn<A, B, ... N, R>A utility type that represents a function taking exactly N parameter(s). (1 <= N <= 3).
objectKeys()Typed wrapper around Object.keys that preserves the key typesobjectEntries()Typed wrapper around Object.entries that preserves key‑value types
type SerializableA utility type that represents serializable thing
isServer()Indicates whether the current execution context is a server environmentisClient()Indicates whether the current execution context is a browser (client) environment