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

Spike: Only consider own-key properties in options objects

    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Description

      BSON should only consider options set as own properties on options objects, and not on the prototype.

      Typically our BSON methods break options out into individual variables so supporting this improvement looks something like:

      const fieldsAsRaw = Object.hasOwn(options, 'fieldsAsRaw') ? options.fieldsAsRaw : defaultOption;
      // etc...
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: