method-alias

v0.1.2
Create a method alias without losing context
context this self instance

method-alias

Create a method alias without losing context

  • save call, the returned alias is always a callable function
  • dynamically type checked

--

Usage:

Install with npm: npm install --save method-alias


var Test= function(){};

Test.prototype.show= function( text ){
    alert( text ); 
};	

var
     instance= new Text()
    ,show= methodAlias( instance, 'show' )
;

show( 'hey!' );

###license

MIT

npm i method-alias

Metadata

  • MIT
  • Whatever
  • Dennis Raymondo van der Sluis
  • released 9/13/2016

Downloads

Maintainers