How to use the ramda.isNil function in ramda

To help you get started, we’ve selected a few ramda 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 plotly / dash-renderer / src / APIController.react.js View on Github external
const {
            appLifecycle,
            dependenciesRequest,
            dispatch,
            graphs,
            layout,
            layoutRequest,
            paths,
        } = props;

        if (isEmpty(layoutRequest)) {
            dispatch(getLayout());
        } else if (layoutRequest.status === STATUS.OK) {
            if (isEmpty(layout)) {
                dispatch(setLayout(layoutRequest.content));
            } else if (isNil(paths)) {
                dispatch(computePaths({subTree: layout, startingPath: []}));
            }
        }

        if (isEmpty(dependenciesRequest)) {
            dispatch(getDependencies());
        } else if (
            dependenciesRequest.status === STATUS.OK &&
            isEmpty(graphs)
        ) {
            dispatch(computeGraphs(dependenciesRequest.content));
        }

        if (
            // dependenciesRequest and its computed stores
            dependenciesRequest.status === STATUS.OK &&
github pagarme / former-kit / src / Button / index.js View on Github external
} = this.props

    const {
      rippleHeight,
      rippleWidth,
      rippleX,
      rippleY,
    } = this.state

    const buttonClasses = classNames(
      theme.button,
      theme[fill],
      theme[`${relevance}Relevance`],
      theme[size],
      {
        [theme.iconButton]: !isNil(icon) && isNil(children),
        [theme.circle]: !isNil(icon) && isNil(children) && circle,
        [theme.hiddenChildren]: !displayChildrenWhenLoading && loading,
      }
    )
    /* eslint-disable react/button-has-type */
    return (
      <button type="{type}" disabled="{disabled}">

        { this.shouldRenderIconAt('start') &amp;&amp; icon }

        { this.renderLoaderSpinnerAt('start') }</button>
github taskcluster / taskcluster-tools / src / views / UnifiedInspector / Inspector.jsx View on Github external
getRunNumber(runId, selectedRun, runs) {
    if (!isNil(runId)) {
      return runId;
    }

    if (!isNil(selectedRun)) {
      return selectedRun;
    }

    if (runs.length) {
      return runs.length - 1;
    }

    return 0;
  }
github plotly / dash-core-components / src / fragments / Graph.react.js View on Github external
isResponsive(props) {
        const {config, figure, responsive} = props;

        if (type(responsive) === 'Boolean') {
            return responsive;
        }

        return Boolean(
            config.responsive &&
                (!figure.layout ||
                    ((figure.layout.autosize ||
                        isNil(figure.layout.autosize)) &&
                        (isNil(figure.layout.height) ||
                            isNil(figure.layout.width))))
        );
    }
github linode / manager / src / features / Volumes / VolumeDrawer / utils.ts View on Github external
export const isNilOrEmpty = (v: any) => isNil(v) || isEmpty(v);
github Flyr1Q / simple-math-ast / src / tokenize / token.js View on Github external
export const isToken = ({ type, value }) => !isNil(type) && !isNil(value);
github multum / pg-differ / src / utils.js View on Github external
exports.isExist = value => !R.isNil(value);
github mitodl / micromasters / static / js / containers / ProfilePage.js View on Github external
renderContent(
    username: string,
    profileInfo: ProfileGetResult,
    profile: Profile,
    currentStep: ?string
  ) {
    const { children, profileProps } = this.props

    if (R.isNil(profileInfo)) {
      return ""
    }

    if (profileInfo.errorInfo !== undefined) {
      return 
    }

    return (
      <div>
        <div>
          {makeProfileProgressDisplay(currentStep)}
        </div>
        <section>
          {childrenWithProps(children, profileProps(profileInfo))}
        </section>
      </div>
github pagarme / artis / src / components / Button / index.js View on Github external
{
      [theme.iconButton]: !isNil(icon) &amp;&amp; isNil(children),
      [theme.circle]: !isNil(icon) &amp;&amp; isNil(children) &amp;&amp; circle,
    }
  )

  return (
    <button type="{type}" disabled="{disabled}">
      {(!isNil(icon) &amp;&amp; iconAlignment === 'start') &amp;&amp; icon}
      {!isNil(children) &amp;&amp; children }
      {(!isNil(icon) &amp;&amp; iconAlignment === 'end') &amp;&amp; icon}
    </button>
  )
}