kewisch / ical.js

Javascript parser for ics (rfc5545) and vcard (rfc6350) data
https://kewisch.github.io/ical.js/
Mozilla Public License 2.0
991 stars 137 forks source link

Add a method to get all parameter names #64

Open kewisch opened 11 years ago

kewisch commented 11 years ago

This one is quite easy, as its really just Object.keys(this.jCal[1]), but I think its better to expose this as a method than to mess around with the inner jCal member.

Lightning can make use of this in its getFirst/NextParameterName iterator methods.

If #63 is taken into account, this method should also return the VALUE parameter in case the property is not using its default type.

lightsofapollo commented 11 years ago

Hmm... I think getting parameter names is weird rather then retuning the whole object (jCal object) (more gc garbage too) but I don't really have strong opinons about it.

Is this more a legacy concern for lightning or is there a better argument for this?

kewisch commented 11 years ago

I'm not so much concerned about lightning here, this is rather about API exposure. If the jCal object is to be considered public, this should either be documented or there should be a method that returns it. If its not public, I think there should be a method to either get the params object or at least the names.