function keys(obj) {
    if (typeof obj.keys === 'function') {
        return Array.from(obj.keys())
    }
    return Object.keys(obj)
}
Returns all keys of an object. Delegates to either obj.keys or Object.keys.
@param obj
@returns {*}