How to use the ramda-adjunct.isEmptyString 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.

github Undistraction / cssapi / src / api / buildBasicStylesAPI.js View on Github external
const appendCSS = css =>
  unless(
    always(isEmptyString(css)),
    compose(joinWithNewline, appendFlipped([css]))
  )
github DFEAGILEDEVOPS / MTC / tslib / src / functions / check-marker / check-marker.v1.ts View on Github external
private async validateData (functionBindings: ICheckMarkerFunctionBindings, validatedCheck: ValidatedCheck, logger: ILogger): Promise<MarkingData | void> {
    if (RA.isEmptyString(validatedCheck.answers)) {
      await this.updateReceivedCheckWithMarkingError(validatedCheck, 'answers property not populated')
      return
    }

    let parsedAnswersJson: any
    try {
      parsedAnswersJson = JSON.parse(validatedCheck.answers)
    } catch (error) {
      await this.updateReceivedCheckWithMarkingError(validatedCheck, 'answers data is not valid JSON')
      return
    }

    if (!RA.isArray(parsedAnswersJson)) {
      await this.updateReceivedCheckWithMarkingError(validatedCheck, 'answers data is not an array')
      return
    }
github DFEAGILEDEVOPS / MTC / admin / lib / validator / common / empty-fields-validators.js View on Github external
R.forEach(f => {
    if (!f.fieldValue || RA.isEmptyString(f.fieldValue && f.fieldValue.trim())) {
      validationError.addError(f.fieldKey, f.errorMessage)
    }
  }, fields)
  return validationError