fix(striker-ui-api): add isObject()

main
Tsu-ba-me 2 years ago
parent 17583ad4b9
commit a1c7be94d6
  1. 10
      striker-ui-api/src/lib/isObject.ts

@ -0,0 +1,10 @@
export const isObject = (value: unknown) => {
const result: { is: boolean; obj: object } = { is: false, obj: {} };
if (typeof value === 'object' && value !== null) {
result.is = true;
result.obj = value;
}
return result;
};
Loading…
Cancel
Save