REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.97 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/css-to-react-native/src/transforms/transform.js
Text
Base64
import { SPACE, COMMA, LENGTH, NUMBER, ANGLE } from '../tokenTypes' const oneOfType = tokenType => functionStream => { const value = functionStream.expect(tokenType) functionStream.expectEmpty() return value } const singleNumber = oneOfType(NUMBER) const singleLength = oneOfType(LENGTH) const singleAngle = oneOfType(ANGLE) const xyTransformFactory = tokenType => ( key, valueIfOmitted ) => functionStream => { const x = functionStream.expect(tokenType) let y if (functionStream.hasTokens()) { functionStream.expect(COMMA) y = functionStream.expect(tokenType) } else if (valueIfOmitted !== undefined) { y = valueIfOmitted } else { // Assumption, if x === y, then we can omit XY // I.e. scale(5) => [{ scale: 5 }] rather than [{ scaleX: 5 }, { scaleY: 5 }] return x } functionStream.expectEmpty() return [{ [`${key}Y`]: y }, { [`${key}X`]: x }] } const xyNumber = xyTransformFactory(NUMBER) const xyLength = xyTransformFactory(LENGTH) const xyAngle = xyTransformFactory(ANGLE) const partTransforms = { perspective: singleNumber, scale: xyNumber('scale'), scaleX: singleNumber, scaleY: singleNumber, translate: xyLength('translate', 0), translateX: singleLength, translateY: singleLength, rotate: singleAngle, rotateX: singleAngle, rotateY: singleAngle, rotateZ: singleAngle, skewX: singleAngle, skewY: singleAngle, skew: xyAngle('skew', '0deg'), } export default tokenStream => { let transforms = [] let didParseFirst = false while (tokenStream.hasTokens()) { if (didParseFirst) tokenStream.expect(SPACE) const functionStream = tokenStream.expectFunction() const { functionName } = functionStream let transformedValues = partTransforms[functionName](functionStream) if (!Array.isArray(transformedValues)) { transformedValues = [{ [functionName]: transformedValues }] } transforms = transformedValues.concat(transforms) didParseFirst = true } return { transform: transforms } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
aspectRatio.js
268 B
lrw-r--r--
2026-02-28 00:26:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
border.js
1.35 KB
lrw-r--r--
2026-02-28 00:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
boxShadow.js
246 B
lrw-r--r--
2026-02-28 00:27:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
flex.js
1.58 KB
lrw-r--r--
2026-02-28 00:28:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
flexFlow.js
983 B
lrw-r--r--
2026-02-28 00:28:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
font.js
1.75 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
fontFamily.js
456 B
lrw-r--r--
2026-02-28 00:28:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fontVariant.js
280 B
lrw-r--r--
2026-02-28 00:28:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.82 KB
lrw-r--r--
2026-02-28 00:28:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
placeContent.js
609 B
lrw-r--r--
2026-02-28 00:28:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
textDecoration.js
1.45 KB
lrw-r--r--
2026-02-28 00:28:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
textDecorationLine.js
374 B
lrw-r--r--
2026-02-28 00:28:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
textShadow.js
236 B
lrw-r--r--
2026-02-28 00:28:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
transform.js
1.97 KB
lrw-r--r--
2026-02-28 00:28:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util.js
2.29 KB
lrw-r--r--
2026-02-28 00:29:00
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).