UNPKG

indicative-utils

Version:

Reusable utilities for indicative validation library

15 lines (14 loc) 405 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.skippable = (value, fieldName, config) => { if (fieldName === '::tip::') { return false; } if (config.existyStrict) { return value === undefined; } if (typeof (value) === 'string') { return value.trim().length === 0; } return value === null || value === undefined; };