react-native-story-component
Version:
Story component for React Native.
20 lines (19 loc) • 519 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isUrl = exports.isNullOrWhitespace = void 0;
const isNullOrWhitespace = input => {
if (typeof input === 'undefined' || input == null) return true;
return input.toString().replace(/\s/g, '').length < 1;
};
exports.isNullOrWhitespace = isNullOrWhitespace;
const isUrl = string => {
try {
return !!new URL(string);
} catch (e) {
return false;
}
};
exports.isUrl = isUrl;
//# sourceMappingURL=ValidationHelpers.js.map