method-alias

0.1.2 • Public • Published

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

/method-alias/

    Package Sidebar

    Install

    npm i method-alias

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • sygn