Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
part-native
Advanced tools
generate helpful methods from native objects using _part_
part
to safely expose all available methods of an object. This
can help make code more modular, functional, and maintainable.part-native
methods are bound to their context or will allow you to curry the context.part-native
at startup, your application will have cached versions of the functions you need,
immune to attempts to hack the native object prototypes.part
-style method collections.Installation:
npm install --save-dev part-native
Usage:
Get a reference to a bound function on a native object.
var log = require( 'part-native' )( 'console' ).log;
[1,2,3].map( log );
or
var map_ = require( 'Array.map_' );
var logAll = map_( log );
logAll( [1,2,3] );
Get a reference to a collection of methods.
var partArray = require( 'part-native' )( 'Array' );
var sum = partArray.reduce_( add );
or use your own objects
function Klass( id ){
this.id = id;
}
Klass.prototype.test = function ( msg ) {
console.log( msg + this.id );
};
var partKlass = require( 'part-native' )( 'Klass', Klass );
var klassMsg = partKlass.test_( 'hi from ' );
klassMsg( new Klass( 1 ) );
FAQs
generate helpful methods from native objects using _part_
The npm package part-native receives a total of 0 weekly downloads. As such, part-native popularity was classified as not popular.
We found that part-native 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.