| @@ 3746-3780 (lines=35) @@ | ||
| 3743 | this.cache( owner ) : |
|
| 3744 | owner[ this.expando ] && owner[ this.expando ][ key ]; |
|
| 3745 | }, |
|
| 3746 | access: function( owner, key, value ) { |
|
| 3747 | var stored; |
|
| 3748 | ||
| 3749 | // In cases where either: |
|
| 3750 | // |
|
| 3751 | // 1. No key was specified |
|
| 3752 | // 2. A string key was specified, but no value provided |
|
| 3753 | // |
|
| 3754 | // Take the "read" path and allow the get method to determine |
|
| 3755 | // which value to return, respectively either: |
|
| 3756 | // |
|
| 3757 | // 1. The entire cache object |
|
| 3758 | // 2. The data stored at the key |
|
| 3759 | // |
|
| 3760 | if ( key === undefined || |
|
| 3761 | ( ( key && typeof key === "string" ) && value === undefined ) ) { |
|
| 3762 | ||
| 3763 | stored = this.get( owner, key ); |
|
| 3764 | ||
| 3765 | return stored !== undefined ? |
|
| 3766 | stored : this.get( owner, jQuery.camelCase( key ) ); |
|
| 3767 | } |
|
| 3768 | ||
| 3769 | // When the key is not a string, or both a key and value |
|
| 3770 | // are specified, set or extend (existing objects) with either: |
|
| 3771 | // |
|
| 3772 | // 1. An object of properties |
|
| 3773 | // 2. A key and value |
|
| 3774 | // |
|
| 3775 | this.set( owner, key, value ); |
|
| 3776 | ||
| 3777 | // Since the "set" path can have two possible entry points |
|
| 3778 | // return the expected data based on which path was taken[*] |
|
| 3779 | return value !== undefined ? value : key; |
|
| 3780 | }, |
|
| 3781 | remove: function( owner, key ) { |
|
| 3782 | var i, name, camel, |
|
| 3783 | cache = owner[ this.expando ]; |
|
| @@ 3598-3631 (lines=34) @@ | ||
| 3595 | return key === undefined ? |
|
| 3596 | cache : cache[ key ]; |
|
| 3597 | }, |
|
| 3598 | access: function( owner, key, value ) { |
|
| 3599 | var stored; |
|
| 3600 | // In cases where either: |
|
| 3601 | // |
|
| 3602 | // 1. No key was specified |
|
| 3603 | // 2. A string key was specified, but no value provided |
|
| 3604 | // |
|
| 3605 | // Take the "read" path and allow the get method to determine |
|
| 3606 | // which value to return, respectively either: |
|
| 3607 | // |
|
| 3608 | // 1. The entire cache object |
|
| 3609 | // 2. The data stored at the key |
|
| 3610 | // |
|
| 3611 | if ( key === undefined || |
|
| 3612 | ((key && typeof key === "string") && value === undefined) ) { |
|
| 3613 | ||
| 3614 | stored = this.get( owner, key ); |
|
| 3615 | ||
| 3616 | return stored !== undefined ? |
|
| 3617 | stored : this.get( owner, jQuery.camelCase(key) ); |
|
| 3618 | } |
|
| 3619 | ||
| 3620 | // [*]When the key is not a string, or both a key and value |
|
| 3621 | // are specified, set or extend (existing objects) with either: |
|
| 3622 | // |
|
| 3623 | // 1. An object of properties |
|
| 3624 | // 2. A key and value |
|
| 3625 | // |
|
| 3626 | this.set( owner, key, value ); |
|
| 3627 | ||
| 3628 | // Since the "set" path can have two possible entry points |
|
| 3629 | // return the expected data based on which path was taken[*] |
|
| 3630 | return value !== undefined ? value : key; |
|
| 3631 | }, |
|
| 3632 | remove: function( owner, key ) { |
|
| 3633 | var i, name, camel, |
|
| 3634 | unlock = this.key( owner ), |
|