How to use the ow.nullOrUndefined function in ow

To help you get started, we’ve selected a few ow 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 ridi / react-viewer / src / contexts / epub / EpubProvider.tsx View on Github external
export const EpubProvider: React.FunctionComponent = ({ children, settingState, calculationState, currentState }: EpubProviderProps) => {
  ow(settingState, 'EpubProvider.settingState', ow.any(ow.nullOrUndefined, Validator.Epub.SettingState));
  ow(calculationState, 'EpubProvider.calculationState', ow.any(ow.nullOrUndefined, Validator.Epub.CalculationState));
  ow(currentState, 'EpubProvider.currentState', ow.any(ow.nullOrUndefined, Validator.Epub.CurrentState));
  return (
    
      
        
          
            {children}
          
        
      
    
  );
};
github ridi / react-viewer / src / contexts / epub / EpubProvider.tsx View on Github external
export const EpubProvider: React.FunctionComponent = ({ children, settingState, calculationState, currentState }: EpubProviderProps) => {
  ow(settingState, 'EpubProvider.settingState', ow.any(ow.nullOrUndefined, Validator.Epub.SettingState));
  ow(calculationState, 'EpubProvider.calculationState', ow.any(ow.nullOrUndefined, Validator.Epub.CalculationState));
  ow(currentState, 'EpubProvider.currentState', ow.any(ow.nullOrUndefined, Validator.Epub.CurrentState));
  return (
    
      
        
          
            {children}
          
        
      
    
  );
};
github ridi / react-viewer / src / contexts / comic / ComicProvider.tsx View on Github external
export const ComicProvider: React.FunctionComponent = ({ children, settingState, calculationState, currentState }: ComicProviderProps) => {
  ow(settingState, 'ComicProvider.settingState', ow.any(ow.nullOrUndefined, Validator.Comic.SettingState));
  ow(calculationState, 'ComicProvider.calculationState', ow.any(ow.nullOrUndefined, Validator.Comic.CalculationState));
  ow(currentState, 'ComicProvider.currentState', ow.any(ow.nullOrUndefined, Validator.Comic.CurrentState));
  return (
    
      
        
          
            {children}
          
        
      
    
  );
};
github ridi / react-viewer / src / contexts / comic / ComicProvider.tsx View on Github external
export const ComicProvider: React.FunctionComponent = ({ children, settingState, calculationState, currentState }: ComicProviderProps) => {
  ow(settingState, 'ComicProvider.settingState', ow.any(ow.nullOrUndefined, Validator.Comic.SettingState));
  ow(calculationState, 'ComicProvider.calculationState', ow.any(ow.nullOrUndefined, Validator.Comic.CalculationState));
  ow(currentState, 'ComicProvider.currentState', ow.any(ow.nullOrUndefined, Validator.Comic.CurrentState));
  return (
    
      
        
          
            {children}
          
        
      
    
  );
};

ow

Function argument validation for humans

MIT
Latest version published 8 months ago

Package Health Score

78 / 100
Full package analysis