Skip to main content
Module

x/mongo/mod.ts>Bson.BufReader#read

MongoDB driver for Deno
Extremely Popular
Go to Latest
method Bson.BufReader.prototype.read
import { Bson } from "https://deno.land/x/mongo@v0.31.0/mod.ts";
const { BufReader } = Bson;

reads data into p. It returns the number of bytes read into p. The bytes are taken from at most one Read on the underlying Reader, hence n may be less than len(p). To read exactly len(p) bytes, use io.ReadFull(b, p).

Parameters

p: Uint8Array

Returns

Promise<number | null>