Remove unnecessary methods

This commit is contained in:
pyoor 2018-08-29 17:46:30 -04:00
parent d721eb5b58
commit aaa01050e2

View file

@ -5,46 +5,6 @@ const jsesc = require('jsesc')
const utils = require('../utils') const utils = require('../utils')
class common extends 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 * Escape and quote a string
* @param s - String to be quoted * @param s - String to be quoted