swc/crates/swc_bundler/tests/.cache/deno/62bd6743e63cf3c65502a0896afd3d9e6db7eba9.ts
2021-11-09 20:42:49 +09:00

17 lines
408 B
TypeScript

// Loaded from https://deno.land/x/mongo@v0.20.0/src/utils/bson.ts
import { Bson } from "../../deps.ts";
export function serializeBson(target: Bson.Document): Uint8Array {
return Bson.serialize(target);
}
export function deserializeBson(buffer: Uint8Array): Bson.Document {
return Bson.deserialize(buffer);
}
export function ObjectId(oid: string): Bson.ObjectId {
return new Bson.ObjectID(oid);
}