Sha256: 400b3533d21e91091fb8acacc28aef1973e7926b68938f048cd2d6d93854b388

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 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"}

Version data entries

3 entries across 1 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js.map
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js.map
trusty-cms-6.3.1 node_modules/@babel/types/lib/converters/toComputedKey.js.map