diff options
author | Shashanka Nataraj <ShashankaNataraj@users.noreply.github.com> | 2019-08-22 05:36:26 +0530 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-08-22 02:06:26 +0200 |
commit | 5ea5946094784f68437ef26d463dfcfbbbaff1f6 (patch) | |
tree | 158256fb9ebf2d69904db439d9f0e9d4a5a81d56 /src | |
parent | ac5f7cd8e29ecc7cdf21c13199be5472375ffa0e (diff) | |
download | jquery-5ea5946094784f68437ef26d463dfcfbbbaff1f6.tar.gz jquery-5ea5946094784f68437ef26d463dfcfbbbaff1f6.zip |
Core: Deprecate jQuery.trim
Fixes gh-4363
Closes gh-4461
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 6 | ||||
-rw-r--r-- | src/deprecated.js | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core.js b/src/core.js index fdc32dde8..01f501d21 100644 --- a/src/core.js +++ b/src/core.js @@ -14,14 +14,13 @@ define( [ "./var/hasOwn", "./var/fnToString", "./var/ObjectFunctionString", - "./var/trim", "./var/support", "./var/isWindow", "./core/DOMEval", "./core/toType" ], function( arr, getProto, slice, concat, push, indexOf, class2type, toString, hasOwn, fnToString, ObjectFunctionString, - trim, support, isWindow, DOMEval, toType ) { + support, isWindow, DOMEval, toType ) { "use strict"; @@ -298,9 +297,6 @@ jQuery.extend( { return ret; }, - trim: function( text ) { - return text == null ? "" : trim.call( text ); - }, // results is for internal usage only makeArray: function( arr, results ) { diff --git a/src/deprecated.js b/src/deprecated.js index 4edefaca0..6ca79d514 100644 --- a/src/deprecated.js +++ b/src/deprecated.js @@ -1,9 +1,9 @@ define( [ "./core", "./var/slice", - + "./var/trim", "./event/alias" -], function( jQuery, slice ) { +], function( jQuery, trim, slice ) { "use strict"; @@ -66,4 +66,8 @@ jQuery.holdReady = function( hold ) { jQuery.ready( true ); } }; + +jQuery.trim = function( text ) { + return text == null ? "" : trim.call( text ); +}; } ); |