Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const validPrefixes = (config, data) =>
pipe(
keys,
without([SCOPES, ALIASES]),
concatRight(keys(config.data[ALIASES]))
)(data)
const addToBatch = ({ name, query, value }) =>
pipe(propValue, concatRight(value), createBreakpointMapping(name, __, query))
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)