const dataTypes = {
    "number" : "number",
    "array" : "array",
    "string" : "string",
    "object" : "object",
    "bigint" : "bigint",
    "symbol" : "symbol",
    "undefined" : "undefined",
    "function" : "function",
    "boolean" : "boolean"
};

export const getDataType = (data)=>{
    let typeofData = typeof data;
    let isArrayDataType = Array.isArray(data);
    if(isArrayDataType)
    {
        return dataTypes.array;
    }
    else 
    {
        return dataTypes[typeofData];
    }
 };

 export const isDataTypeOf=(data,type)=>{
    return getDataType(data) === type;
 }

 export default dataTypes;