Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
a9fa2ec7
Commit
a9fa2ec7
authored
Mar 04, 2014
by
Michał Gołębiowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core: Remove native String#trim usage to save size
(cherry-picked from
279913c7
) Fixes #14794
parent
b96522ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
core.js
src/core.js
+6
-16
trim.js
src/var/trim.js
+0
-3
No files found.
src/core.js
View file @
a9fa2ec7
...
@@ -7,9 +7,8 @@ define([
...
@@ -7,9 +7,8 @@ define([
"./var/class2type"
,
"./var/class2type"
,
"./var/toString"
,
"./var/toString"
,
"./var/hasOwn"
,
"./var/hasOwn"
,
"./var/trim"
,
"./var/support"
"./var/support"
],
function
(
deletedIds
,
slice
,
concat
,
push
,
indexOf
,
class2type
,
toString
,
hasOwn
,
trim
,
support
)
{
],
function
(
deletedIds
,
slice
,
concat
,
push
,
indexOf
,
class2type
,
toString
,
hasOwn
,
support
)
{
var
var
version
=
"@VERSION"
,
version
=
"@VERSION"
,
...
@@ -349,20 +348,11 @@ jQuery.extend({
...
@@ -349,20 +348,11 @@ jQuery.extend({
},
},
// Support: Android<4.1, IE<9
// Support: Android<4.1, IE<9
// Use native String.trim function wherever possible
trim
:
function
(
text
)
{
trim
:
trim
&&
!
trim
.
call
(
"
\
uFEFF
\
xA0"
)
?
return
text
==
null
?
function
(
text
)
{
""
:
return
text
==
null
?
(
text
+
""
).
replace
(
rtrim
,
""
);
""
:
},
trim
.
call
(
text
);
}
:
// Otherwise use our own trimming functionality
function
(
text
)
{
return
text
==
null
?
""
:
(
text
+
""
).
replace
(
rtrim
,
""
);
},
// results is for internal usage only
// results is for internal usage only
makeArray
:
function
(
arr
,
results
)
{
makeArray
:
function
(
arr
,
results
)
{
...
...
src/var/trim.js
deleted
100644 → 0
View file @
b96522ac
define
(
function
()
{
return
""
.
trim
;
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment