PHP 8.2.30
Preview: index.js Size: 1.82 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/css-to-react-native/src/transforms/index.js

import {
  AUTO,
  COLOR,
  LENGTH,
  PERCENT,
  UNSUPPORTED_LENGTH_UNIT,
  WORD,
} from '../tokenTypes'
import aspectRatio from './aspectRatio'
import border from './border'
import boxShadow from './boxShadow'
import flex from './flex'
import flexFlow from './flexFlow'
import font from './font'
import fontFamily from './fontFamily'
import fontVariant from './fontVariant'
import placeContent from './placeContent'
import textDecoration from './textDecoration'
import textDecorationLine from './textDecorationLine'
import textShadow from './textShadow'
import transform from './transform'
import { directionFactory, parseShadowOffset } from './util'

const background = tokenStream => ({
  backgroundColor: tokenStream.expect(COLOR),
})
const borderColor = directionFactory({
  types: [COLOR],
  prefix: 'border',
  suffix: 'Color',
})
const borderRadius = directionFactory({
  directions: ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'],
  prefix: 'border',
  suffix: 'Radius',
})
const borderWidth = directionFactory({ prefix: 'border', suffix: 'Width' })
const margin = directionFactory({
  types: [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT, AUTO],
  prefix: 'margin',
})
const padding = directionFactory({ prefix: 'padding' })

const fontWeight = tokenStream => ({
  fontWeight: tokenStream.expect(WORD), // Also match numbers as strings
})
const shadowOffset = tokenStream => ({
  shadowOffset: parseShadowOffset(tokenStream),
})
const textShadowOffset = tokenStream => ({
  textShadowOffset: parseShadowOffset(tokenStream),
})

export default {
  aspectRatio,
  background,
  border,
  borderColor,
  borderRadius,
  borderWidth,
  boxShadow,
  flex,
  flexFlow,
  font,
  fontFamily,
  fontVariant,
  fontWeight,
  margin,
  padding,
  placeContent,
  shadowOffset,
  textShadow,
  textShadowOffset,
  textDecoration,
  textDecorationLine,
  transform,
}

Directory Contents

Dirs: 0 × Files: 15

Name Size Perms Modified Actions
268 B lrw-r--r-- 2026-02-28 00:26:54
Edit Download
1.35 KB lrw-r--r-- 2026-02-28 00:27:14
Edit Download
246 B lrw-r--r-- 2026-02-28 00:27:46
Edit Download
1.58 KB lrw-r--r-- 2026-02-28 00:28:08
Edit Download
983 B lrw-r--r-- 2026-02-28 00:28:18
Edit Download
1.75 KB lrw-r--r-- 2026-02-28 00:28:26
Edit Download
456 B lrw-r--r-- 2026-02-28 00:28:28
Edit Download
280 B lrw-r--r-- 2026-02-28 00:28:30
Edit Download
1.82 KB lrw-r--r-- 2026-02-28 00:28:38
Edit Download
609 B lrw-r--r-- 2026-02-28 00:28:42
Edit Download
1.45 KB lrw-r--r-- 2026-02-28 00:28:46
Edit Download
374 B lrw-r--r-- 2026-02-28 00:28:50
Edit Download
236 B lrw-r--r-- 2026-02-28 00:28:54
Edit Download
1.97 KB lrw-r--r-- 2026-02-28 00:28:58
Edit Download
2.29 KB lrw-r--r-- 2026-02-28 00:29:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).