MCPcopy Index your code
hub / github.com/fb55/htmlparser2 / isBuffer

Function isBuffer

src/WritableStream.ts:10–12  ·  view source on GitHub ↗
(_chunk: string | Buffer, encoding: string)

Source from the content-addressed store, hash-verified

8
9// Following the example in https://nodejs.org/api/stream.html#stream_decoding_buffers_in_a_writable_stream
10function isBuffer(_chunk: string | Buffer, encoding: string): _chunk is Buffer {
11 return encoding === "buffer";
12}
13
14/**
15 * WritableStream makes the `Parser` interface available as a NodeJS stream.

Callers 1

_writeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…