Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b676ae

Browse files
authored
Deprecated: Remove jQuery.trim
The API has been deprecated in 3.5.0 so it can be removed in 4.0.0.Refgh-4461Closesgh-4695
1 parentbfb6897 commit0b676ae

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

‎src/deprecated.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
importjQueryfrom"./core.js";
22
importslicefrom"./var/slice.js";
3-
importtrimfrom"./var/trim.js";
43

54
import"./deprecated/ajax-event-alias.js";
65
import"./deprecated/event.js";
@@ -43,7 +42,3 @@ jQuery.holdReady = function( hold ) {
4342
jQuery.ready(true);
4443
}
4544
};
46-
47-
jQuery.trim=function(text){
48-
returntext==null ?"" :trim.call(text);
49-
};

‎src/var/trim.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎test/unit/deprecated.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -199,25 +199,3 @@ QUnit[ jQuery.proxy ? "test" : "skip" ]( "jQuery.proxy", function( assert ) {
199199
cb=jQuery.proxy(fn,null,"arg1","arg2");
200200
cb.call(thisObject,"arg3");
201201
});
202-
203-
QUnit[jQuery.trim ?"test" :"skip"]("trim",function(assert){
204-
assert.expect(13);
205-
206-
varnbsp=String.fromCharCode(160);
207-
208-
assert.equal(jQuery.trim("hello "),"hello","trailing space");
209-
assert.equal(jQuery.trim(" hello"),"hello","leading space");
210-
assert.equal(jQuery.trim(" hello "),"hello","space on both sides");
211-
assert.equal(jQuery.trim(" "+nbsp+"hello "+nbsp+" "),"hello"," ");
212-
213-
assert.equal(jQuery.trim(),"","Nothing in.");
214-
assert.equal(jQuery.trim(undefined),"","Undefined");
215-
assert.equal(jQuery.trim(null),"","Null");
216-
assert.equal(jQuery.trim(5),"5","Number");
217-
assert.equal(jQuery.trim(false),"false","Boolean");
218-
219-
assert.equal(jQuery.trim(" "),"","space should be trimmed");
220-
assert.equal(jQuery.trim("ipad\xA0"),"ipad","nbsp should be trimmed");
221-
assert.equal(jQuery.trim("\uFEFF"),"","zwsp should be trimmed");
222-
assert.equal(jQuery.trim("\uFEFF \xA0! | \uFEFF"),"! |","leading/trailing should be trimmed");
223-
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp