@amimpact/willy-utils 4.13.0 → 4.14.0
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/package.json +1 -1
- package/src/form.ts +1 -14
package/package.json
CHANGED
package/src/form.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verwijdert de Froala footer uit de HTML string
|
|
3
|
-
* @param {string} htmlString
|
|
4
|
-
* @return {string} HTML string zonder de Froala footer
|
|
5
|
-
*/
|
|
6
|
-
const removeFroalaFooter = (htmlString) => {
|
|
7
|
-
if (typeof htmlString !== 'string') {
|
|
8
|
-
return htmlString;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return htmlString.replace(/<p[^>]*data-f-id="pbf"[^>]*>[\s\S]*?<\/p>/, '');
|
|
12
|
-
};
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* Creeert een FormData object vanuit een object
|
|
16
3
|
* https://gist.github.com/ghinda/8442a57f22099bdb2e34#gistcomment-2719686
|
|
@@ -76,7 +63,7 @@ export const convertObjectToFormData = (
|
|
|
76
63
|
const val = model[propertyName];
|
|
77
64
|
const formDataValue = typeof val === 'boolean' ? (val ? '1' : '0') : val;
|
|
78
65
|
|
|
79
|
-
formData.append(formKey,
|
|
66
|
+
formData.append(formKey, formDataValue.toString());
|
|
80
67
|
}
|
|
81
68
|
}
|
|
82
69
|
|