You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several API functions in index.js accept either an XML document or a string as an argument. A check using typeof source === 'string' is usually used to make this distinction. It would be nice if these functions were to accept Buffer objects as well. Buffer.isBuffer(source) could be used to distinguish that case.
The code in XmlDocument::FromXml reads like it should support auto-detecing the encoding if a buffer gets passed in, so we wouldn't have to worry about this.
The text was updated successfully, but these errors were encountered:
This is a spin-off from #30 (comment).
Several API functions in
index.js
accept either an XML document or a string as an argument. A check usingtypeof source === 'string'
is usually used to make this distinction. It would be nice if these functions were to accept Buffer objects as well.Buffer.isBuffer(source)
could be used to distinguish that case.The code in
XmlDocument::FromXml
reads like it should support auto-detecing the encoding if a buffer gets passed in, so we wouldn't have to worry about this.The text was updated successfully, but these errors were encountered: