Code review comment for lp:~bcsaller/juju-gui/namespace-routing

Revision history for this message
Gary Poster (gary) wrote :

Data:

* Trim is available in recent JS, but it only trims whitespace:
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim

* JS does not have a regex escape function, but YUI does:
http://yuilibrary.com/yui/docs/api/classes/Escape.html

* To my knowledge YUI does not implement an arbitrary trim function,
such as the one Ben would need.

Opinions:

* I agree with Benji that we don't want to mutate YUI modules.

* I think Ben's current one-off functions are fine for now, as I said in
my review. We could add trim function to a module somewhere as a slack
task if someone wanted to, or if Ben wanted to. I do agree that using
the regex might in fact lead to somewhat more concise code, but,
<shrug>.

I'd like to see this landed asap.

https://codereview.appspot.com/7327045/

« Back to merge proposal