Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@frui.ts/helpers
Advanced tools
@frui.ts/helpers
Helper functions for various use cases.
@bound
A function decorator that binds context of the function to the parent class. This is useful for direct use of the function as event handler <Xxx onClick={vm.decoratedFunction} />
so that new anonymous functions are not allocated for each render (compare to <Xxx onClick={() => vm.decoratedFunction()} />
).
// in view model
class MyViewModel {
@bound someAction() {
// you can safely use 'this' here
}
}
// in view
<button onClick={vm.someAction} />
createMap
Helper function for easily creating Maps.
const items = [
{ id: 1, name: "One" },
{ id: 2, name: "Two" },
{ id: 3, name: "Three" },
];
// map of items by key
const itemsById = createMap(items, x => x.id); // Map<number, { id, name }>
// map of values by key
const namesById = createMap(items, x => x.id, x => x.name); // Map<number, string>
nameof
Syntactic sugar for creating strings that are also a key of a type.
this.pagingFilter.sortColumn = nameof<User>("login"); // the same as ="login", but checked on compile time that the class 'User' actually has a 'login' field
FAQs
Frui.ts helper functions
The npm package @frui.ts/helpers receives a total of 582 weekly downloads. As such, @frui.ts/helpers popularity was classified as not popular.
We found that @frui.ts/helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.