Skip to content
A port of the jQuery proxy functionality to NodeJS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
coffee
example
jscript
.gitignore
Cakefile
Gemfile
Gemfile.lock
README.md
package.json
rakefile.rb

README.md

nodeproxy

A port of the jQuery proxy functionality to NodeJS.

Installation

The easiest way to install is through the Node Package Manager (NPM):

npm install nodeproxy

Usage

var nodeproxy = require('nodeproxy');

function ObjectOne(){
	function helloWorld(){
		console.log("Hello " + this.name);
	}
	return {
		helloWorld: helloWorld
	}
}

function ObjectTwo(){
	function init(){
		var contextObject = { name: 'iain' };
		var objectOne = new ObjectOne();
		nodeproxy(objectOne.helloWorld, contextObject)();
	}
	return {
		init: init
	}
}

var objectTwo = new ObjectTwo();
objectTwo.init();
//Console will display..
//Hello iain
You can’t perform that action at this time.