Buckets:
| ; | |
| Object.defineProperty(exports, "__esModule", { | |
| value: true | |
| }); | |
| exports.hasValue = hasValue; | |
| exports.isAdornedStart = isAdornedStart; | |
| exports.isFilled = isFilled; | |
| // Supports determination of isControlled(). | |
| // Controlled input accepts its current value as a prop. | |
| // | |
| // @see https://facebook.github.io/react/docs/forms.html#controlled-components | |
| // @param value | |
| // @returns {boolean} true if string (including '') or number (including zero) | |
| function hasValue(value) { | |
| return value != null && !(Array.isArray(value) && value.length === 0); | |
| } | |
| // Determine if field is empty or filled. | |
| // Response determines if label is presented above field or as placeholder. | |
| // | |
| // @param obj | |
| // @param SSR | |
| // @returns {boolean} False when not present or empty string. | |
| // True when any number or string with length. | |
| function isFilled(obj, SSR = false) { | |
| return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== ''); | |
| } | |
| // Determine if an Input is adorned on start. | |
| // It's corresponding to the left with LTR. | |
| // | |
| // @param obj | |
| // @returns {boolean} False when no adornments. | |
| // True when adorned at the start. | |
| function isAdornedStart(obj) { | |
| return obj.startAdornment; | |
| } |
Xet Storage Details
- Size:
- 1.27 kB
- Xet hash:
- f02f8c35bb67f6b235f650b4d48f17aae02dc5b9c451ac7578c3f1b53de7e536
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.