Sha256: 5336e88fae8615fe73d0470d1d2f6badb6189d01767201fe4c4f317582cf6956

Contents?: true

Size: 1.08 KB

Versions: 161

Compression:

Stored size: 1.08 KB

Contents

{"version":3,"names":["_index","require","isPlaceholderType","placeholderType","targetType","aliases","PLACEHOLDERS_ALIAS","alias"],"sources":["../../src/validators/isPlaceholderType.ts"],"sourcesContent":["import { PLACEHOLDERS_ALIAS } from \"../definitions/index.ts\";\n\n/**\n * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`.\n */\nexport default function isPlaceholderType(\n  placeholderType: string,\n  targetType: string,\n): boolean {\n  if (placeholderType === targetType) return true;\n\n  const aliases: Array<string> | undefined =\n    PLACEHOLDERS_ALIAS[placeholderType];\n  if (aliases) {\n    for (const alias of aliases) {\n      if (targetType === alias) return true;\n    }\n  }\n\n  return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKe,SAASC,iBAAiBA,CACvCC,eAAuB,EACvBC,UAAkB,EACT;EACT,IAAID,eAAe,KAAKC,UAAU,EAAE,OAAO,IAAI;EAE/C,MAAMC,OAAkC,GACtCC,yBAAkB,CAACH,eAAe,CAAC;EACrC,IAAIE,OAAO,EAAE;IACX,KAAK,MAAME,KAAK,IAAIF,OAAO,EAAE;MAC3B,IAAID,UAAU,KAAKG,KAAK,EAAE,OAAO,IAAI;IACvC;EACF;EAEA,OAAO,KAAK;AACd","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
immosquare-cleaner-0.1.50 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map