Side navigation
#14630 closed feature (notabug)
Opened December 12, 2013 01:53AM UTC
Closed December 12, 2013 03:20AM UTC
replace this with a local variable to save minified file size
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.10.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
it will be save about 1k if replace this with a local variable.
e.g.
get: function( num ) {
return num != null ?
// Return a 'clean' array
( num < 0 ? this[ num + this.length ] : this[ num ] ) :
// Return just the object
slice.call( this );
}
replace it with
get: function( num ) {
var that = this;
return num != null ?
// Return a 'clean' array
( num < 0 ? that[ num + that.length ] : that[ num ] ) :
// Return just the object
slice.call( that );
}
Attachments (0)
Change History (3)
Changed December 12, 2013 01:58AM UTC by comment:1
| _comment0: | Did you do you test using gzip? Because I've found that this actually hurts the file size. → 1386813503022391 |
|---|---|
| owner: | → anonymous |
| status: | new → pending |
Changed December 12, 2013 03:19AM UTC by comment:2
| status: | pending → new |
|---|
oops, this is a whim recommendation. close this ticket please.
Changed December 12, 2013 03:20AM UTC by comment:3
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Did you do your test using gzip? Because I've found that this actually hurts the file size.