From aaa01050e2448fc7015555e621ce23fb67f57334 Mon Sep 17 00:00:00 2001 From: pyoor Date: Wed, 29 Aug 2018 17:46:30 -0400 Subject: [PATCH] Remove unnecessary methods --- lib/utils/common.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/lib/utils/common.js b/lib/utils/common.js index d35f2ef..7cb9d70 100644 --- a/lib/utils/common.js +++ b/lib/utils/common.js @@ -5,46 +5,6 @@ const jsesc = require('jsesc') const utils = require('../utils') class common extends utils { - /** - * Return stringified object - * @param obj - * @returns {string} - */ - static objToString (obj) { - try { - return `${obj}` - } catch (e) { - return `[${e}]` - } - } - - /** - * Return enumerable properties recursively - * @param obj - * @returns {Array} - */ - static getAllProperties (obj) { - let list = [] - while (obj) { - list = list.concat(Object.getOwnPropertyNames(obj)) - obj = Object.getPrototypeOf(obj) - } - return list - } - - /** - * Return all properties (non-recursive) - * @param obj - * @returns {Array} - */ - static getKeysFromHash (obj) { - let list = [] - for (let p in obj) { - list.push(p) - } - return list - } - /** * Escape and quote a string * @param s - String to be quoted