Side navigation
#1451 closed bug (wontfix)
Opened August 01, 2007 07:14PM UTC
Closed September 15, 2007 01:36PM UTC
Last modified March 15, 2012 01:43AM UTC
Boolean expression or conditional operator
| Reported by: | hobbit | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2.1 |
| Component: | core | Version: | 1.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
trim: function(t){
return (t||"").replace(/^\\s+|\\s+$/g, "");
}
The following expression is shorter and faster.
trim: function(t){
return t?t.replace(/^\\s+|\\s+$/g, ""):"";
}
Attachments (0)
Change History (1)
Changed September 15, 2007 01:36PM UTC by comment:1
| milestone: | 1.1.4 → 1.2.1 |
|---|---|
| resolution: | → wontfix |
| status: | new → closed |
| version: | 1.1.3 → 1.2 |