working on vcard display
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export function addr(vcard){
|
||||
const match = vcard.match(/^ADR:(.+)$/m);
|
||||
const match = vcard.match(/^ADR.*:(.+)$/m);
|
||||
let adr = {
|
||||
box: null,
|
||||
ext: null,
|
||||
@@ -22,9 +22,18 @@ export function addr(vcard){
|
||||
return adr;
|
||||
}
|
||||
|
||||
export function email(vcard){
|
||||
const match = vcard.match(/^EMAIL.*:(.+)$/m);
|
||||
return match ? match[1].trim() : '';
|
||||
}
|
||||
|
||||
export function extra(code){
|
||||
const match = code.match(/^X-(.+):(.+)/)
|
||||
return match ? {name:match[1],value:match[2]} : null
|
||||
}
|
||||
|
||||
export function fn(vcard){
|
||||
const match = vcard.match(/^FN:(.+)$/m);
|
||||
const match = vcard.match(/^FN.*:(.+)$/m);
|
||||
return match ? match[1].trim() : '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user