How to use the ramda-adjunct.appendFlipped 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-mq / src / errors2.js View on Github external
// -----------------------------------------------------------------------------
// Utils
// -----------------------------------------------------------------------------

const constructError = construct(Error)

const throwError = error => {
  throw error
}

const throwNewError = compose(throwError, constructError)

export const throwErrorWithMessage = compose(
  throwNewError,
  joinWithSpace,
  appendFlipped([ERROR_PREFIX])
)

export const throwErrorWithPrefixedMessage = prefix =>
  compose(throwErrorWithMessage, joinWithSpace, appendFlipped([prefix]))

// -----------------------------------------------------------------------------
// Prefixed Errors
// -----------------------------------------------------------------------------

export const throwConfigureError = compose(
  throwErrorWithPrefixedMessage(CONFIGURE_PREFIX),
  argumentsFailureRenderer
)

export const throwAPIMediaTypeError = compose(
  throwErrorWithPrefixedMessage(API_MEDIA_TYPE_PREFIX),
github Undistraction / cssapi / src / build / declarations / renderers / renderBatch.js View on Github external
const writeToString = outputString =>
  compose(joinWithDoubleNewlines, compact, appendFlipped([outputString]))
github Undistraction / cssapi / src / breakpoints / breakpointProvider.js View on Github external
const createMappingByIndex = breakpointMap => (mappings, value, idx) =>
  pipe(
    findBreakpointByIndex(breakpointMap),
    insert(1, value),
    apply(createBreakpointMapping),
    appendFlipped(mappings)
  )(idx)
github Undistraction / cssapi / src / breakpoints / breakpointProvider.js View on Github external
const createMappingByName = breakpointMap => (
  mappings,
  { name, range, value }
) =>
  pipe(
    processRange(breakpointMap),
    createBreakpointMapping(name, value),
    appendFlipped(mappings)
  )(range)
github Undistraction / cssapi / src / build / declarations / createDeclarationProcessor.js View on Github external
const reducer = (propName, data, style) => (declarations, breakpointMapping) =>
  pipe(processDeclaration, appendFlipped(declarations))(
    propName,
    data,
    style,
    breakpointMapping
  )
github Undistraction / cssapi / src / breakpoints / breakpointProvider.js View on Github external
const parseBreakpointToMap = (breakpoints, [name, value]) =>
  pipe(parseBreakpoint, assocValue(value), appendFlipped(breakpoints))(name)
github Undistraction / cssapi / src / build / buildApi.js View on Github external
const processDeclaration = declarationProcessors => (
  acc,
  [processorName, args]
) => {
  const property = prop(processorName, declarationProcessors)

  when(isNil, () => throwAPIError(invalidPropertyError(processorName)))(
    property
  )
  return pipe(ensureArray, apply(property), appendFlipped(acc))(args)
}
github Undistraction / cssapi / src / errors.js View on Github external
const throwPrefixedError = prefix =>
  compose(throwLibError, joinWithSpace, appendFlipped([prefix]))
github Undistraction / cssapi / src / api / buildBasicStylesAPI.js View on Github external
const appendCSS = css =>
  unless(
    always(isEmptyString(css)),
    compose(joinWithNewline, appendFlipped([css]))
  )