How to use the ramda-adjunct.isUndefined 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 / expandData.js View on Github external
const [prefix, keyName] = splitOnColon(dataNodeItem)
    const dataNodeName = has(prefix, sourceData)
      ? prefix
      : resolveDataAlias(prefix)
    if (isUndefined(dataNodeName)) {
      const availableKeys = without([SCOPES, ALIASES])(
        concat(keys(sourceData), keys(config.data[ALIASES]))
      )
      throwDataError(unrecognisedDataPrefixError(prefix, availableKeys))
    }
    const dataNode = prop(dataNodeName, sourceData)
    if (isUndefined(dataNode))
      throwDataError(missingDataNodeError(dataNodeName))

    const resolvedValue = prop(keyName, dataNode)
    if (isUndefined(resolvedValue))
      throwDataError(missingDataItemKeyError(dataNodeName, keyName))

    // eslint-disable-next-line no-use-before-define
    return expandDataNodeItem(sourceData)(resolvedValue)
  }
github Undistraction / cssapi / src / build / expandData.js View on Github external
const expandToken = sourceData => dataNodeItem => {
    const [prefix, keyName] = splitOnColon(dataNodeItem)
    const dataNodeName = has(prefix, sourceData)
      ? prefix
      : resolveDataAlias(prefix)
    if (isUndefined(dataNodeName)) {
      const availableKeys = without([SCOPES, ALIASES])(
        concat(keys(sourceData), keys(config.data[ALIASES]))
      )
      throwDataError(unrecognisedDataPrefixError(prefix, availableKeys))
    }
    const dataNode = prop(dataNodeName, sourceData)
    if (isUndefined(dataNode))
      throwDataError(missingDataNodeError(dataNodeName))

    const resolvedValue = prop(keyName, dataNode)
    if (isUndefined(resolvedValue))
      throwDataError(missingDataItemKeyError(dataNodeName, keyName))

    // eslint-disable-next-line no-use-before-define
    return expandDataNodeItem(sourceData)(resolvedValue)
  }
github Undistraction / cssapi / src / build / expandData.js View on Github external
const expandToken = sourceData => dataNodeItem => {
    const [prefix, keyName] = splitOnColon(dataNodeItem)
    const dataNodeName = has(prefix, sourceData)
      ? prefix
      : resolveDataAlias(prefix)
    if (isUndefined(dataNodeName)) {
      const availableKeys = without([SCOPES, ALIASES])(
        concat(keys(sourceData), keys(config.data[ALIASES]))
      )
      throwDataError(unrecognisedDataPrefixError(prefix, availableKeys))
    }
    const dataNode = prop(dataNodeName, sourceData)
    if (isUndefined(dataNode))
      throwDataError(missingDataNodeError(dataNodeName))

    const resolvedValue = prop(keyName, dataNode)
    if (isUndefined(resolvedValue))
      throwDataError(missingDataItemKeyError(dataNodeName, keyName))

    // eslint-disable-next-line no-use-before-define
    return expandDataNodeItem(sourceData)(resolvedValue)
  }
github char0n / monad-t / src / MonetEitherT / index.js View on Github external
function MonetEitherT(monad, isRightValue = true) {
  if (isUndefined(new.target)) {
    if (isNotNull(FlutureTMonetEither) && isFuture(monad)) {
      return FlutureTMonetEither.fromFuture(monad);
    } else if (monad instanceof Identity.fn.init) {
      return Either.of(monad.get());
    } else if (monad instanceof Either.fn.init && isNotNull(FlutureTMonetEither)) {
      return FlutureTMonetEither.fromEither(monad);
    }
    return new MonetEitherT(monad);
  }

  this.run = monad;
  this.isRightValue = isRightValue;
}
github char0n / monad-t / src / FlutureTMonetEither / index.js View on Github external
function FlutureTMonetEither(monad) {
  if (isUndefined(new.target)) {
    if (isFuture(monad)) {
      return FlutureTMonetEither.fromFuture(monad);
    } else if (monad instanceof Identity.fn.init) {
      return FlutureTMonetEither.fromValue(monad.get());
    } else if (monad instanceof Either.fn.init) {
      return FlutureTMonetEither.fromEither(monad);
    }
    throw new Error('FlutureTMonetEither can transform only specific monad types');
  }

  this.run = monad;
  this['@@type'] = this.constructor['@@type'];
}