Sha256: 389d084b02c631b230a2479139ee64b0eae1b64c7277dc44e0ca9ae7d50c485f
Contents?: true
Size: 509 Bytes
Versions: 3
Compression:
Stored size: 509 Bytes
Contents
//= require "existence" if (doesNotExist(Function.prototype['method'])) { Function.prototype.method = function(name, func) { try { if (doesNotExist(name)) { throw new SyntaxError("Object.method(name, func): name is undefined"); } if (doesNotExist(func)) { throw new SyntaxError("Object.method(name, func): func is undefined"); } if (doesNotExist(this.prototype[name])) { this.prototype[name] = func; return this; } } catch(error) { alert(error.message); } }; }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
judojs-0.9.4 | repository/judojs/core/extend.js |
judojs-0.9.3 | repository/judojs/core/extend.js |
judojs-0.9.2 | repository/judojs/core/extend.js |