UNPKG

@mic-rexjs/usecases-react

Version:

React-based solution for use usecases of Clean Architecture

14 lines 452 B
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; import { useConstant } from '../useConstant'; import { ArgumentTypes } from '../../enums/ArgumentTypes'; export const useArgumentTypes = args => { return useConstant(() => { const _args = _slicedToArray(args, 2), arg2 = _args[1]; const type2 = typeof arg2; if (type2 === 'function') { return ArgumentTypes.Entity; } return ArgumentTypes.None; }); };