From 67e9cccf0987accd6faacf4e70d9416d0da5d7d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 23 Oct 2020 13:54:42 +0200 Subject: [PATCH] Cleanups. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Utils.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/utils/Utils.js b/src/utils/Utils.js index bd8c8036..3009ae56 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -15,26 +15,6 @@ class Utils { return date.toISOString().substr(11, 8); } - static isIterable(obj) { - if (obj) { - return typeof obj[Symbol.iterator] === 'function'; - } - return false; - } - - static isEmptyJSon(document) { - // Empty? - if (!document) { - return true; - } - // Check type - if (typeof document !== 'object') { - return true; - } - // Check - return Object.keys(document).length === 0; - } - static removeExtraEmptyLines(tab) { // Start from the end for (let i = tab.length - 1; i > 0; i--) { @@ -157,6 +137,26 @@ class Utils { return JSON.parse(JSON.stringify(jsonDocument)); } + static isIterable(obj) { + if (obj) { + return typeof obj[Symbol.iterator] === 'function'; + } + return false; + } + + static isEmptyJSon(document) { + // Empty? + if (!document) { + return true; + } + // Check type + if (typeof document !== 'object') { + return true; + } + // Check + return Object.keys(document).length === 0; + } + static isString(value) { return typeof value === 'string'; } -- 2.34.1