{
  "version": 3,
  "sources": ["../../../src/utils/validator/primitive.mts"],
  "sourcesContent": ["import type {\n  Nullish,\n  PrimitiveTypes,\n  TypeofMapping,\n} from \"../../types/common.mjs\";\nimport type { OmitKey } from \"../../types/object.mjs\";\nimport type { Validator } from \"./common.mjs\";\n\nexport const isPrimitive: Validator<PrimitiveTypes> = (\n  value\n): value is PrimitiveTypes =>\n  (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\nexport const isString: Validator<string> = (value): value is string =>\n  typeof value === \"string\";\nexport const isNumber: Validator<number> = (value): value is number =>\n  typeof value === \"number\";\nexport const isBoolean: Validator<boolean> = (value): value is boolean =>\n  typeof value === \"boolean\";\nexport const isSymbol: Validator<symbol> = (value): value is symbol =>\n  typeof value === \"symbol\";\nexport const isBigint: Validator<bigint> = (value): value is bigint =>\n  typeof value === \"bigint\";\nexport const isUndefined: Validator<undefined> = (value): value is undefined =>\n  value === undefined;\nexport const isNull: Validator<null> = (value): value is null => value === null;\nexport const isNullish: Validator<Nullish> = (value): value is Nullish =>\n  value == null;\ntype PrimitiveOnlyTypeofMapping = OmitKey<TypeofMapping, \"function\" | \"object\">;\n\nexport const typeofIs =\n  <K extends keyof TypeofMapping>(typeName: K): Validator<TypeofMapping[K]> =>\n  (value): value is TypeofMapping[K] =>\n    typeof value === typeName;\nexport const isPrimitiveOf: <K extends keyof PrimitiveOnlyTypeofMapping>(\n  typename: K\n) => Validator<PrimitiveOnlyTypeofMapping[K]> = typeofIs;\nexport const primitiveOf = isPrimitiveOf;\n"],
  "mappings": "AAQO,MAAM,cAAyC,CACpD,UAEC,OAAO,UAAU,YAAY,OAAO,UAAU,cAAe,UAAU;AACnE,MAAM,WAA8B,CAAC,UAC1C,OAAO,UAAU;AACZ,MAAM,WAA8B,CAAC,UAC1C,OAAO,UAAU;AACZ,MAAM,YAAgC,CAAC,UAC5C,OAAO,UAAU;AACZ,MAAM,WAA8B,CAAC,UAC1C,OAAO,UAAU;AACZ,MAAM,WAA8B,CAAC,UAC1C,OAAO,UAAU;AACZ,MAAM,cAAoC,CAAC,UAChD,UAAU;AACL,MAAM,SAA0B,CAAC,UAAyB,UAAU;AACpE,MAAM,YAAgC,CAAC,UAC5C,SAAS;AAGJ,MAAM,WACX,CAAgC,aAChC,CAAC,UACC,OAAO,UAAU;AACd,MAAM,gBAEmC;AACzC,MAAM,cAAc;",
  "names": []
}
