Skip to content

Google Closure notes

sunetos edited this page Sep 13, 2010 · 3 revisions

Eclipse search-replace regex to make all object properties quoted so Closure doesn’t rename them:


Find: ^(\s*[,]?\s*)([0-9a-zA-Z_-]+): 
Replace: \1'\2': 

Search-replace to help convert from old functional inheritance to prototypal:


Find: ^,(\s*)([^:]+): function
Replace: a3d.Classname.prototype.\2 = function
Clone this wiki locally