chaining.js 111 Bytes RawBlameHistoryPermalink 1 2 3 export const optionalChaining = (obj, ...rest) => { return rest.reduce((newObj, key) => newObj[key], obj) }