REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.28 KB
Close
/home/byroehnu/.trash/node_modules11/@emotion/babel-plugin/src/utils/transpiled-output-utils.js
Text
Base64
// this only works correctly in modules, but we don't run on scripts anyway, so it's fine // the difference is that in modules template objects are being cached per call site export function getTypeScriptMakeTemplateObjectPath(path) { if (path.node.arguments.length === 0) { return null } const firstArgPath = path.get('arguments')[0] if ( firstArgPath.isLogicalExpression() && firstArgPath.get('left').isIdentifier() && firstArgPath.get('right').isAssignmentExpression() && firstArgPath.get('right.right').isCallExpression() && firstArgPath.get('right.right.callee').isIdentifier() && firstArgPath.node.right.right.callee.name.includes('makeTemplateObject') && firstArgPath.node.right.right.arguments.length === 2 ) { return firstArgPath.get('right.right') } return null } // this is only used to prevent appending strings/expressions to arguments incorectly // we could push them to found array expressions, as we do it for TS-transpile output ¯\_(ツ)_/¯ // it seems overly complicated though - mainly because we'd also have to check against existing stuff of a particular type (source maps & labels) // considering Babel double-transpilation as a valid use case seems rather far-fetched export function isTaggedTemplateTranspiledByBabel(path) { if (path.node.arguments.length === 0) { return false } const firstArgPath = path.get('arguments')[0] if ( !firstArgPath.isCallExpression() || !firstArgPath.get('callee').isIdentifier() ) { return false } const calleeName = firstArgPath.node.callee.name if (!calleeName.includes('templateObject')) { return false } const bindingPath = path.scope.getBinding(calleeName).path if (!bindingPath.isFunction()) { return false } const functionBody = bindingPath.get('body.body') if (!functionBody[0].isVariableDeclaration()) { return false } const declarationInit = functionBody[0].get('declarations')[0].get('init') if (!declarationInit.isCallExpression()) { return false } const declarationInitArguments = declarationInit.get('arguments') if ( declarationInitArguments.length === 0 || declarationInitArguments.length > 2 || declarationInitArguments.some(argPath => !argPath.isArrayExpression()) ) { return false } return true }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
add-import.js
750 B
lrw-r--r--
2026-02-28 00:26:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
create-node-env-conditional.js
373 B
lrw-r--r--
2026-02-28 00:27:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-styled-options.js
2.79 KB
lrw-r--r--
2026-02-28 00:28:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-target-class-name.js
1.49 KB
lrw-r--r--
2026-02-28 00:28:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
537 B
lrw-r--r--
2026-02-28 00:28:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
label.js
4.62 KB
lrw-r--r--
2026-02-28 00:28:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
minify.js
3.91 KB
lrw-r--r--
2026-02-28 00:28:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
object-to-string.js
1.26 KB
lrw-r--r--
2026-02-28 00:28:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
source-maps.js
1.07 KB
lrw-r--r--
2026-02-28 00:28:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
strings.js
1.90 KB
lrw-r--r--
2026-02-28 00:28:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
transform-expression-with-styles.js
4.21 KB
lrw-r--r--
2026-02-28 00:28:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
transformer-macro.js
1.65 KB
lrw-r--r--
2026-02-28 00:28:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
transpiled-output-utils.js
2.28 KB
lrw-r--r--
2026-02-28 00:28:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).