mquan/cortex — pull request #17 by natew (2014-02-23 19:13:46+00:00)
Title: Adding val alias for getValue

Not sure if you'd like to consider this, but while I like the consistency of get___ I find my primary use case is always getValue and it can feel verbose.

It would be nice actually if we could allow patching of DataWrapper similar to React. For example you can do a

var ReactMount = require('react/lib/ReactMount');
ReactMount.allowFullPageRender = true;

Which lets you change React without having to fork or anything messy. Will experiment with this, I could see it being as simple as:

var DataWrapper = require('cortexjs/src/data_wrapper');
DataWrapper.prototype.val = DataWrapper.prototype.getValue;