Sha256: 8d3c4f82d194cea4296e6967be94ea06f4d2f23295a54298d9617adec4d4ac6d

Contents?: true

Size: 1022 Bytes

Versions: 161

Compression:

Stored size: 1022 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","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.45 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/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 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/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.44 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.43 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.42 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.41 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.40 node_modules/@babel/types/lib/converters/ensureBlock.js.map
wice_grid-7.1.0 node_modules/@babel/types/lib/converters/ensureBlock.js.map
immosquare-cleaner-0.1.39 node_modules/@babel/types/lib/converters/ensureBlock.js.map