pankod/refine

View on GitHub
packages/inferencer/src/field-inferencers/boolean.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { FieldInferencer } from "../types";

export const booleanInfer: FieldInferencer = (key, value) => {
  const isBoolean = typeof value === "boolean";

  if (isBoolean) {
    return {
      key,
      type: "boolean",
    };
  }

  return false;
};