file-type - vcard are considered as a ics calendar JavaScript

Hello,

I try the lib on a .vcf file, that begin with BEGIN:VCARD, and file-type return { "ext": "ics", "mime": "text/calendar" }.

Maybe it's related to the detection of ICS.

Would it be better to detect ics files with BEGIN:VCALENDAR ? That would allow to detect vcf files with BEGIN:VCARD ?

Asked Oct 07 '21 00:10
avatar mdartic
mdartic

2 Answer:

Yes, good catch. PR welcome to fix this and also add vCard support if you want.

1
Answered Apr 13 '21 at 17:08
avatar  of sindresorhus
sindresorhus

I create the PR https://github.com/sindresorhus/file-type/pull/451 Please check it if you have some time :-)

1
Answered Apr 15 '21 at 16:46
avatar  of mdartic
mdartic