swc/bundler/tests/.cache/deno/62bd6743e63cf3c65502a0896afd3d9e6db7eba9.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +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);
}