parser-js
parser-js copied to clipboard
Certain suggestions for the new API
I have been migrating parser-js
in glee, and have some suggestions for the new Intent API for the parser
-
It would be nice to have some function to check if the channel has send or receive operations for example,
channels.get(channelName).hasSendOperation()
. -
It Would be nice to have some function to access the first or last message in an operation, this would be useful for writing tests or in spec v2 where we have a single message associated with any channel.
channels().get('test/channel').operations().messages().getFirst().payload()
-
In the previous API we had a function to check if a channel has a server property like
channels.hasServers()
which is not missing. Would be nice to have this functionality something likechannels.get(channelName).hasServer()