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.
@keenondrums/metadata-utils
Advanced tools
Convenience utils for reflected metadata.
Run
npm i @keenondrums/metadata-utils reflect-metadata
Add import 'reflect-metadata'
to the root of your application
Gets metadata from the prototype (using Relect.getMetadata) and sets it as own metadata. Useful to enhance performance for retrieving metadata from ancestors. Has the same signature as Relect.getMetadata.
import 'reflect-metadata'
import { getMetadataAndCache } from '@keenondrums/metadata-utils'
class Parent {}
Reflect.defineMetadata('key', 'value', Parent)
Reflect.getOwnMetadata('key', Parent) // returns 'value'
getMetadataAndCache('key', Parent) // returns 'value', basically calls Reflect.getOwnMetadata under the hood and does nothing else in this case
class Child extends Parent {}
Reflect.getOwnMetadata('key', Child) // returns `undefined` as Child doesn't have any own metadata for 'key'
getMetadataAndCache('key', Child) // returns 'value' from Parent and set it as own metadata
Reflect.getOwnMetadata('key', Child) // now it returns 'value'
FAQs
Convenience utils for reflected metadata
The npm package @keenondrums/metadata-utils receives a total of 0 weekly downloads. As such, @keenondrums/metadata-utils popularity was classified as not popular.
We found that @keenondrums/metadata-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.