How to use the ramda-adjunct.concatRight function in ramda-adjunct

To help you get started, we’ve selected a few ramda-adjunct examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Undistraction / cssapi / src / build / expansion / expandData.js View on Github external
const validPrefixes = (config, data) =>
  pipe(
    keys,
    without([SCOPES, ALIASES]),
    concatRight(keys(config.data[ALIASES]))
  )(data)
github Undistraction / cssapi / src / utils / declarations.js View on Github external
const addToBatch = ({ name, query, value }) =>
  pipe(propValue, concatRight(value), createBreakpointMapping(name, __, query))
github Undistraction / cssapi / src / utils / converters.js View on Github external
export const pxValueToRemOrEmValue = (value, baseFontSize) =>
  divide(value, baseFontSize)

export const pxValueToRemOrEmString = (unit, baseFontSize, value) =>
  joinWithNoSpace([flip(pxValueToRemOrEmValue)(baseFontSize)(value), unit])

export const pxValueToPxString = value => joinWithNoSpace([value, PX])

export const percentageStringToRatio = compose(
  divideBy(100),
  numericPartOfUnitedNumberString
)

export const ratioToPercentString = compose(
  concatRight(PERCENT_UNIT),
  String,
  multiply(100)
)

export const unitlessNumberToDistance = (unit, baseFontSize) => value =>
  cond([
    [equals(PX), () => pxValueToPxString(value)],
    [equals(REM), () => pxValueToRemOrEmString(REM, baseFontSize, value)],
    [equals(EM), () => pxValueToRemOrEmString(EM, baseFontSize, value)],
  ])(unit)

export const mulitplyUnitlessNumbersToDistance = (factor, unit, baseFontSize) =>
  pipe(
    numericPartOfUnitedNumberString,
    multiply(factor),
    unitlessNumberToDistance(unit, baseFontSize)