diff options
author | Jesús Eduardo <heckyel@hyperbola.info> | 2017-12-25 16:58:41 -0500 |
---|---|---|
committer | Jesús Eduardo <heckyel@hyperbola.info> | 2017-12-25 16:58:41 -0500 |
commit | 49d54c0c3199fb8e380ce68f8fb08a308ddf56a7 (patch) | |
tree | 87e9be319452d75241476853a3b240aabdcbd7e2 /lib/jquery/src/core/access.js | |
parent | 6a844225b3b63b89926e136cf65c140df01a4677 (diff) | |
download | ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.lz ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.xz ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.zip |
migración mayor a smarty PHP
Diffstat (limited to 'lib/jquery/src/core/access.js')
-rw-r--r-- | lib/jquery/src/core/access.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/lib/jquery/src/core/access.js b/lib/jquery/src/core/access.js deleted file mode 100644 index 86cdbc7..0000000 --- a/lib/jquery/src/core/access.js +++ /dev/null @@ -1,70 +0,0 @@ -define( [ - "../core" -], function( jQuery ) { - -"use strict"; - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - -return access; - -} ); |