Opened 9 years ago
Closed 9 years ago
#14630 closed feature (notabug)
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 ); }
Change History (3)
comment:1 Changed 9 years ago by
Owner: | set to anonymous |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
oops, this is a whim recommendation. close this ticket please.
comment:3 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Did you do your test using gzip? Because I've found that this actually hurts the file size.