mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Improved Contacts to check if changes should be saved
This commit is contained in:
parent
c9ad0ef170
commit
2627a16c36
43 changed files with 102 additions and 63 deletions
|
|
@ -2,12 +2,6 @@
|
|||
* Inspired by https://github.com/mcpar-land/vcfer
|
||||
*/
|
||||
|
||||
const
|
||||
camelCase = str =>
|
||||
str.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) =>
|
||||
index === 0 ? word.toLowerCase() : word.toUpperCase()
|
||||
).replace(/\s+/g, '');
|
||||
|
||||
export class VCardProperty {
|
||||
|
||||
/**
|
||||
|
|
@ -68,7 +62,7 @@ export class VCardProperty {
|
|||
parseFromJCardProperty(jCardProp)
|
||||
{
|
||||
jCardProp = JSON.parse(JSON.stringify(jCardProp));
|
||||
this.field = camelCase(jCardProp[0]);
|
||||
this.field = jCardProp[0].toLowerCase();
|
||||
this.params = jCardProp[1];
|
||||
this.type = jCardProp[2];
|
||||
this.value = jCardProp[3];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue