How to use the lodash-es.isNil function in lodash-es

To help you get started, we’ve selected a few lodash-es 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 sogehige / sogeBot / src / panel / widgets / components / eventlist.vue View on Github external
this.socket.emit('settings', (e, data) => {
      this.settings = {
        widgetEventlistFollows: isNil(data.widgetEventlistFollows) ? true : data.widgetEventlistFollows,
        widgetEventlistHosts: isNil(data.widgetEventlistHosts) ? true : data.widgetEventlistHosts,
        widgetEventlistRaids: isNil(data.widgetEventlistRaids) ? true : data.widgetEventlistRaids,
        widgetEventlistCheers: isNil(data.widgetEventlistCheers) ? true : data.widgetEventlistCheers,
        widgetEventlistSubs: isNil(data.widgetEventlistSubs) ? true : data.widgetEventlistSubs,
        widgetEventlistSubgifts: isNil(data.widgetEventlistSubgifts) ? true : data.widgetEventlistSubgifts,
        widgetEventlistSubcommunitygifts: isNil(data.widgetEventlistSubcommunitygifts) ? true : data.widgetEventlistSubcommunitygifts,
        widgetEventlistResubs: isNil(data.widgetEventlistResubs) ? true : data.widgetEventlistResubs,
        widgetEventlistTips: isNil(data.widgetEventlistTips) ? true : data.widgetEventlistTips
      }

      this.eventlistShow = data.widgetEventlistShow
      this.eventlistSize = data.widgetEventlistSize,
      this.eventlistMessageSize = data.widgetEventlistMessageSize
      console.group('Eventlist widgets settings')
      console.debug(this.settings)
      console.groupEnd()
    })
    this.socket.emit('get') // get initial widget state
github microsoft / fast-dna / packages / fast-components-react-base / src / auto-suggest / auto-suggest.tsx View on Github external
private isMatch(node: ListboxItemProps): boolean {
        if (!isNil(this.storedValueString)) {
            return node.value
                .toLowerCase()
                .includes(this.storedValueString.toLowerCase());
        }
    }
github microsoft / fast-dna / packages / fast-components-react-msft / src / action-toggle / action-toggle.tsx View on Github external
private hasGlyphAndContent(): boolean {
        return this.state.selected
            ? !isNil(this.props.selectedGlyph) && !isNil(this.props.selectedContent)
            : !isNil(this.props.unselectedGlyph) && !isNil(this.props.unselectedContent);
    }
github sogehige / sogeBot / src / panel / views / managers / commands / commands-list.vue View on Github external
const isSearchInResponse = o.responses.filter(o => {
        return !isNil(o.response.match(new RegExp(this.search, 'ig')))
      }).length > 0
      return isSearchInCommand || isSearchInResponse
github microsoft / fast-dna / packages / fast-components-react-msft / src / action-toggle / action-toggle.tsx View on Github external
private hasGlyphAndContent(): boolean {
        return this.state.selected
            ? !isNil(this.props.selectedGlyph) && !isNil(this.props.selectedContent)
            : !isNil(this.props.unselectedGlyph) && !isNil(this.props.unselectedContent);
    }
github microsoft / fast-dna / packages / fast-components-react-msft / src / button-base / button-base.tsx View on Github external
private hasBeforeOrAfterAndChildren(): boolean {
        return (
            !isNil(this.props.children) &&
            (!isNil(this.props.beforeContent) || !isNil(this.props.afterContent))
        );
    }
}
github openshift / console / frontend / public / components / monitoring.tsx View on Github external
const Annotation = ({ children, title }) =>
  _.isNil(children) ? null : (
    <>
      <dt>{title}</dt>
      <dd>{children}</dd>
    
  );
github openshift / console / frontend / public / components / operator-lifecycle-manager / clusterserviceversion.tsx View on Github external
export const CSVSubscription: React.FC = (props) =&gt; {
  const EmptyMsg = () =&gt; ;
  const subscription = props.subscription
    .filter(sub =&gt; sub.metadata.namespace === (props.obj.metadata.annotations || {})['olm.operatorNamespace'])
    .find(sub =&gt; _.get(sub.status, 'installedCSV') === props.obj.metadata.name);

  return 
     status.packageName === subscription.spec.name &amp;&amp; status.catalogSource === subscription.spec.source &amp;&amp; status.catalogSourceNamespace === subscription.spec.sourceNamespace)
        : null} /&gt;
  ;
};
github palantir / tslint-playground / src / utils.ts View on Github external
export const decodeUrl = (url: string) => {
  const urlParameters = new URLSearchParams(url);

  if (urlParameters.has("saved")) {
    const savedParameter = urlParameters.get("saved");
    if (isNil(savedParameter)) {
      return undefined;
    }
    const decompressed = lzString.decompressFromEncodedURIComponent(
      savedParameter
    );
    return JSON.parse(decompressed);
  }

  return undefined;
};