
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
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 1 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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.