UNPKG

object-hierarchy-access

Version:

Get/Set value from/to JS object hierarchy properties

17 lines (16 loc) 305 B
function normalizeDescriptor(info) { if (typeof info === 'object') { return info; } else if (typeof info === 'function') { return { getName: info }; } else { return { name: info }; } } export { normalizeDescriptor };