Archive for October 28th, 2007

Chainable interface in JavaScript

Creating Chainable interfaces in javascript…


(function() {
	function _init() {
		return this;
	}

	_init.prototype = {
		"myFunction": function() {
			return this;
		}

		// Put all the functions here - make sure all 'return this;'
	}

	chainer = function() {
		return new _init();
	}
})();

Roll out your own JavaScript Interfaces

[tags][/tags]

Create a Permanent Alias in Fish Shell

This is how you create a permanent alias is fish


alias x='exit'
save_function x