Zazama / node-id3

Pure JavaScript ID3 Tag library
MIT License
285 stars 57 forks source link

Improve support for integer values #147

Closed pbricout closed 1 year ago

pbricout commented 1 year ago

The documentation does not specify that the timeStamp values must be an integer. When the values are not an integer the appendNumber function silently omit to write the value and creates an invalid encoded buffer.

fixes #146

pbricout commented 1 year ago

It is arguable whether we want to automatically truncate the values like in some other cases, but I think it is better to notify the user that something is wrong rather than automagically trying to fix the value.

Maybe we should also update the documentation to specify that failing to meet this requirement will throw.

pbricout commented 1 year ago

Hey @Zazama do you mind having a look at this PR? Thanks.

Zazama commented 1 year ago

Sounds reasonable, kind of interesting to learn that there is no normal int type in js. I think the documentation is clear like this