Skip to content
Permalink
Browse files

Core: Remove native String#trim usage to save size

Fixes #14794
  • Loading branch information...
mgol committed Mar 4, 2014
1 parent a359961 commit 279913c71b63da721fa2f118cdce150effbf773e
Showing with 6 additions and 19 deletions.
  1. +6 −16 src/core.js
  2. +0 −3 src/var/trim.js
@@ -7,9 +7,8 @@ define([
"./var/class2type",
"./var/toString",
"./var/hasOwn",
"./var/trim",
"./var/support"
], function( arr, slice, concat, push, indexOf, class2type, toString, hasOwn, trim, support ) {
], function( arr, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {

var
// Use the correct document accordingly with window argument (sandbox)
@@ -341,20 +340,11 @@ jQuery.extend({
},

// Support: Android<4.1
// Use native String.trim function wherever possible
trim: trim && !trim.call("\uFEFF\xA0") ?
function( text ) {
return text == null ?
"" :
trim.call( text );
} :

// Otherwise use our own trimming functionality
function( text ) {
return text == null ?
"" :
( text + "" ).replace( rtrim, "" );
},
trim: function( text ) {
return text == null ?
"" :
( text + "" ).replace( rtrim, "" );
},

// results is for internal usage only
makeArray: function( arr, results ) {

This file was deleted.

0 comments on commit 279913c

Please sign in to comment.
You can’t perform that action at this time.