REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.49 KB
Close
/home/byroehnu/easepaybiz.easetack.com/node_modules/@emotion/babel-plugin/src/utils/get-target-class-name.js
Text
Base64
import findRoot from 'find-root' import memoize from '@emotion/memoize' import nodePath from 'path' import hashString from '@emotion/hash' import escapeRegexp from 'escape-string-regexp' let hashArray = (arr /*: Array<string> */) => hashString(arr.join('')) const unsafeRequire = require const getPackageRootPath = memoize(filename => findRoot(filename)) const separator = new RegExp(escapeRegexp(nodePath.sep), 'g') const normalizePath = path => nodePath.normalize(path).replace(separator, '/') export function getTargetClassName(state, t) { if (state.emotionTargetClassNameCount === undefined) { state.emotionTargetClassNameCount = 0 } const hasFilepath = state.file.opts.filename && state.file.opts.filename !== 'unknown' const filename = hasFilepath ? state.file.opts.filename : '' // normalize the file path to ignore folder structure // outside the current node project and arch-specific delimiters let moduleName = '' let rootPath = filename try { rootPath = getPackageRootPath(filename) moduleName = unsafeRequire(rootPath + '/package.json').name } catch (err) {} const finalPath = filename === rootPath ? 'root' : filename.slice(rootPath.length) const positionInFile = state.emotionTargetClassNameCount++ const stuffToHash = [moduleName] if (finalPath) { stuffToHash.push(normalizePath(finalPath)) } else { stuffToHash.push(state.file.code) } const stableClassName = `e${hashArray(stuffToHash)}${positionInFile}` return stableClassName }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
add-import.js
750 B
lrw-r--r--
2026-03-05 00:19:55
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-03-05 00:19:55
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-03-05 00:19:59
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-03-05 00:20:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
537 B
lrw-r--r--
2026-03-05 00:20:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
label.js
4.62 KB
lrw-r--r--
2026-03-05 00:20:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
minify.js
3.91 KB
lrw-r--r--
2026-03-05 00:20:04
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-03-05 00:20:05
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-03-05 00:20:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
strings.js
1.90 KB
lrw-r--r--
2026-03-05 00:20:08
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-03-05 00:20:09
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-03-05 00:20:09
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-03-05 00:20:09
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).