UNPKG

rc-hooks

Version:
16 lines (15 loc) 353 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function getRef(ref) { if (typeof ref === 'function') { // @ts-ignore return ref(); } else if (typeof ref === 'object' && ref && 'current' in ref) { return ref.current; } else { return ref; } } exports.default = getRef;