Sha256: 177c3bd70b823195ac63ad1ab51bbb8babb97b98446b3171d17399a2fed7784f

Contents?: true

Size: 1.19 KB

Versions: 187

Compression:

Stored size: 1.19 KB

Contents

{"version":3,"names":["_index","require","_index2","toComputedKey","node","key","property","computed","isIdentifier","stringLiteral","name"],"sources":["../../src/converters/toComputedKey.ts"],"sourcesContent":["import { isIdentifier } from \"../validators/generated/index.ts\";\nimport { stringLiteral } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toComputedKey(\n  node:\n    | t.ObjectMember\n    | t.ObjectProperty\n    | t.ClassMethod\n    | t.ClassProperty\n    | t.ClassAccessorProperty\n    | t.MemberExpression\n    | t.OptionalMemberExpression,\n  // @ts-expect-error todo(flow->ts): maybe check the type of node before accessing .key and .property\n  key: t.Expression | t.PrivateName = node.key || node.property,\n) {\n  if (!node.computed && isIdentifier(key)) key = stringLiteral(key.name);\n\n  return key;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGe,SAASE,aAAaA,CACnCC,IAO8B,EAE9BC,GAAiC,GAAGD,IAAI,CAACC,GAAG,IAAID,IAAI,CAACE,QAAQ,EAC7D;EACA,IAAI,CAACF,IAAI,CAACG,QAAQ,IAAI,IAAAC,mBAAY,EAACH,GAAG,CAAC,EAAEA,GAAG,GAAG,IAAAI,qBAAa,EAACJ,GAAG,CAACK,IAAI,CAAC;EAEtE,OAAOL,GAAG;AACZ","ignoreList":[]}

Version data entries

187 entries across 16 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helpers/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/converters/toComputedKey.js.map
immosquare-cleaner-0.1.52 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map