@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.
Files changed (2) hide show
  1. package/form_helper.js +11 -0
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"