From 27106028fd550dffc46f9e51e04617dee932f2de Mon Sep 17 00:00:00 2001 From: redhoodsu Date: Sat, 26 Oct 2019 19:27:11 +0800 Subject: [PATCH] chore: remove stripHtmlTag util --- doc/UTIL_API.md | 13 ------------- src/lib/util.js | 27 --------------------------- 2 files changed, 40 deletions(-) diff --git a/doc/UTIL_API.md b/doc/UTIL_API.md index c8ead6a..019eb47 100644 --- a/doc/UTIL_API.md +++ b/doc/UTIL_API.md @@ -2414,19 +2414,6 @@ When time is out, all remaining values will all be "Timeout". stringifyAll(function test() {}); // -> '{"value":"function test() {}","type":"Function",...}' ``` -## stripHtmlTag - -Strip html tags from a string. - -|Name |Type |Desc | -|------|------|---------------| -|str |string|String to strip| -|return|string|Result string | - -```javascript -stripHtmlTag('

Hello

'); // -> 'Hello' -``` - ## throttle Return a new throttled version of the passed function. diff --git a/src/lib/util.js b/src/lib/util.js index 64a1374..e9fdf65 100644 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -8183,33 +8183,6 @@ export var stringifyAll = _.stringifyAll = (function (exports) { return exports; })({}); -/* ------------------------------ stripHtmlTag ------------------------------ */ - -export var stripHtmlTag = _.stripHtmlTag = (function (exports) { - /* Strip html tags from a string. - * - * |Name |Type |Desc | - * |------|------|---------------| - * |str |string|String to strip| - * |return|string|Result string | - */ - - /* example - * stripHtmlTag('

Hello

'); // -> 'Hello' - */ - - /* typescript - * export declare function stripHtmlTag(str: string): string; - */ - var regHtmlTag = /<[^>]*>/g; - - exports = function(str) { - return str.replace(regHtmlTag, ''); - }; - - return exports; -})({}); - /* ------------------------------ throttle ------------------------------ */ export var throttle = _.throttle = (function (exports) {