
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@ubloimmo/front-util
Advanced tools
Utility types and functions for use in other libraries and satellites
A collection of utility types and functions
Install the package with your manager of choice.
# npm
npm install @ubloimmo/front-util
# yarn
yarn add @ubloimmo/front-util
# bun
bun add @ubloimmo/front-util
Import an utility type...
import type { GenericFn, Nullish } from "@ubloimmo/front-util";
const addTwoNumbers: GenericFn<[number, number], number> = (a, b) => a + b;
const joinStrings: GenericFn<string[], string> = (...strings) => {
return strings.join();
}
...or a function.
import type { Nullish } from "@ubloimmo/front-util";
import { isNumber } from "@ubloimmo/front-util";
const isMoreThanTen = (a: Nullish<number>) => {
if (isNumber(a)) return a > 10;
return false;
}
A bunch of generics for usage in various cases. All documented using jsdoc.
GenericFn
VoidFn
AsyncFn
MaybeAsyncFn
Predicate
Primitives
NullishPritives
Nullable<T>
Optional<T>
Nullish<T>
NonNullable<T>
NonOptional<T>
NonNullish<T>
KeyOf<TObject, TRestriction>
DeepKeyOf<TObject, TRestriction>
DeepRequired<T>
DeepNullish<T>
DeepNonNullish<T>
DeepNullable<T>
DeepNonNullable<T>
DeepOptional<T>
DeepNonOptional<T>
DeepPickLax<T, TKey>
DeepPick<TObject, TKey>
Some commonly used utility functions
Functions that verify the type of a value at runtime. Type safe.
isNumber()
isString()
isBoolean()
isObject()
isArray()
isNull()
isUndefined()
isNullish()
objectKeys()
objectValues()
objectEntries()
objectFromEntries()
transformObject()
arrayFilter()
Logger()
factoryFunctions and type declarations that have yet to be added to this lib
Address
Currency
UUID
FAQs
Utility types and functions for use in other libraries and satellites
We found that @ubloimmo/front-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.