From 4ef8e367408b569e9466af67f2969357305698a3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 10 May 2018 15:17:02 +0800 Subject: [PATCH] String.js --- String.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/String.js b/String.js index d326c40186..0e76ae79d0 100644 --- a/String.js +++ b/String.js @@ -98,19 +98,19 @@ String.prototype.toggle = function(value, other){ * * @return {String} The clean string */ -String.prototype.unicodeClean: function () { - return this.replace(/[\s\S]/g, - function(character) { - if (character.charCodeAt()< 256) { - return character; - } - try { - encodeURIComponent(character); - } catch(e) { - return ''; - } - return character; - } - ); - } +String.prototype.unicodeClean = function () { + return this.replace(/[\s\S]/g, + function(character) { + if (character.charCodeAt()< 256) { + return character; + } + try { + encodeURIComponent(character); + } catch(e) { + return ''; + } + return character; + } + ); +}; -- 2.39.2