Sha256: d0758518c115915ea10590473eef63026c59784b0d2ec53124eb7882e64536f0

Contents?: true

Size: 1006 Bytes

Versions: 3

Compression:

Stored size: 1006 Bytes

Contents

{"version":3,"names":["_toBlock","require","ensureBlock","node","key","result","toBlock"],"sources":["../../src/converters/ensureBlock.ts"],"sourcesContent":["import toBlock from \"./toBlock.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Ensure the `key` (defaults to \"body\") of a `node` is a block.\n * Casting it to a block if it is not.\n *\n * Returns the BlockStatement\n */\nexport default function ensureBlock(\n  node: t.Node,\n  key: string = \"body\",\n): t.BlockStatement {\n  // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n  const result = toBlock(node[key], node);\n  // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n  node[key] = result;\n  return result;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASe,SAASC,WAAWA,CACjCC,IAAY,EACZC,GAAW,GAAG,MAAM,EACF;EAElB,MAAMC,MAAM,GAAG,IAAAC,gBAAO,EAACH,IAAI,CAACC,GAAG,CAAC,EAAED,IAAI,CAAC;EAEvCA,IAAI,CAACC,GAAG,CAAC,GAAGC,MAAM;EAClB,OAAOA,MAAM;AACf"}

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/ensureBlock.js.map
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
trusty-cms-6.3.1 node_modules/@babel/types/lib/converters/ensureBlock.js.map