@osimatic/helpers-js 1.0.76 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/form_helper.js +11 -0
- package/package.json +1 -1
package/form_helper.js
CHANGED
|
@@ -105,6 +105,17 @@ class FormHelper {
|
|
|
105
105
|
}).get().filter(word => word.length > 0);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
static getInputValue(input) {
|
|
109
|
+
if (typeof input == 'undefined') {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
let value = $(input).val();
|
|
113
|
+
if (value === null || value === '') {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
|
|
108
119
|
static getLinesOfTextarea(textarea) {
|
|
109
120
|
return textarea.val().replace(/(\r\n|\n|\r)/g, "\n").split("\n").filter(word => word.length > 0);
|
|
110
121
|
}
|