Skip to content

Support ArrayBuffer / SharedArrayBuffer / Uint8Array #3

@iongion

Description

@iongion

Hi,

I am using bsonify and I have noticed some differences from the https://github.com/mongodb/js-bson which I take as reference implementation.

Code like this works in js-bson

      var image = fs.readFileSync(path.join(root, 'assets/small.png'));
      serialize(image);

But with bsonfy one has to

      var image = fs.readFileSync(path.join(root, 'assets/small.png'));
      serialize(Uint8Array(image.buffer));

What should be the path to support more of these translations just like js-bson does to have 1-1 compatbility ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions