-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: BSON
https://github.com/mongodb/js-bson/issues/308
The API is extremely unclear. Are there better docs anywhere? Or examples? The unit tests aren't very useful as examples.
E.g. how do you use the binary type? Looks like with ``new Binary(array)``, but then what? This, for example, doesn't work:
bson.serialize({foo: new bson.Binary(new Uint8Array(10))})
and throws
data.copy(buffer, index, 0, value.position); ^ TypeError: data.copy is not a function