UNPKG

object-hierarchy-access

Version:

Get/Set value from/to JS object hierarchy properties

19 lines (18 loc) 359 B
function normalizeDescriptor(info) { if (info && typeof info === 'object') { return info; } else if (typeof info === 'function') { return { getName: info, value: {} }; } else { return { name: info, value: {} }; } } export { normalizeDescriptor };