Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3640

Int32 constructor should coerce its argument

    • 2
    • Not Needed

      The Int32 constructor should coerce its argument immediately to int32, so that e.g. Int32(-(2**40)).valueOf() === 0 instead of Int32(-(2**40)).valueOf() === -(2**40). This makes it consistent with e.g. Long, and makes Int32 match what is being serialized when encoding as BSON.

      AC

      • Make sure the behavior matches what is described above
      • Test numbers outside the range of Int32, positive and negative

            Assignee:
            grace.chong@mongodb.com Grace Chong (Inactive)
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: