-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues if dealing with vcf with multiple cards #11
Comments
Looking at the source I see |
This should just be the default. Why would want to combine all your contacts into one object? |
@jwerre If you think this needs changing, then please do file a new issue, or – even better – send a PR. |
@jhermsmeier Is there any benefit of using BTW a simple fix would simply to update the readme with indication of |
@ajmas to be honest, I don't recall what the reasoning behind it was. I'm more than happy to change the API to default to parsing multiple objects from an input for the static |
@jhermsmeier okay sounds good. In the meantime do you think the PR for the documentation change for the 1.x branch is an acceptable stop-gap? |
@ajmas yup, just reviewed :) |
This issue is still is still persisting for me. Using I am parsing this that is straight from Google Contacts:
It is returning one vcard object merging the |
@zacharytyhacz I suspect that's happening because you're calling |
@jhermsmeier , yes that is the method I used, |
@zacharytyhacz can you post an example of what you're doing? I cannot reproduce that in any way, i.e. see: > var vCard = require( '.' )
undefined
> var value = `BEGIN:VCARD
... VERSION:3.0
... FN:Bolt Action
... N:Action;Bolt;;;
... item1.EMAIL;TYPE=INTERNET:boltaction@mmmm.com
... item1.X-ABLabel:
... END:VCARD
... BEGIN:VCARD
... VERSION:3.0
... FN:Brenna Damatta
... N:Damatta;Brenna;;;
... item1.EMAIL;TYPE=INTERNET:brenna@mmmm.com
... item1.X-ABLabel:
... END:VCARD`
undefined
> vCard.parse( value )
[
vCard {
version: '3.0',
data: {
version: Property {},
fn: Property {},
n: Property {},
email: [Property]
}
},
vCard {
version: '3.0',
data: {
version: Property {},
fn: Property {},
n: Property {},
email: [Property]
}
}
] |
The library appears to run into issues if a vcf file contains multiple vCards. What I see is the records from all the vCards are merged into one entry.
For example (trimmed):
It would be useful to have this scenario supported, even if it via a new function
parseMulti()
, as to not break assumptions of code depending on current design.The text was updated successfully, but these errors were encountered: