bytes
Types from the Go package bytes (a library PocketBase builds on), as JavaScript sees them: they turn up as values of PocketBase's types and of hook events.
bytes.Reader
A Reader implements the io.reader, io.readerAt, io.writerTo, io.seeker,
io.byteScanner, and io.runeScanner interfaces by reading from
a byte slice.
Unlike a Buffer, a Reader is read-only and supports seeking.
The zero value for Reader operates like a Reader of an empty slice.
| Member | Type | |
|---|---|---|
len() |
(): number |
Len returns the number of bytes of the unread portion of the slice. |
size() |
(): number |
Size returns the original length of the underlying byte slice. Size is the number of bytes available for reading via Reader.readAt. The result is unaffected by any method calls except Reader.reset. |
read() |
(b: string|Array<number>): number |
Read implements the io.reader interface. |
readAt() |
(b: string|Array<number>, off: number): number |
ReadAt implements the io.readerAt interface. |
readByte() |
(): number |
ReadByte implements the io.byteReader interface. |
unreadByte() |
(): void |
UnreadByte complements Reader.readByte in implementing the io.byteScanner interface. |
readRune() |
(): [number, number] |
ReadRune implements the io.runeReader interface. |
unreadRune() |
(): void |
UnreadRune complements Reader.readRune in implementing the io.runeScanner interface. |
seek() |
(offset: number, whence: number): number |
Seek implements the io.seeker interface. |
writeTo() |
(w: io.Writer): number |
WriteTo implements the io.writerTo interface. |
reset() |
(b: string|Array<number>): void |
Reset resets the Reader to be reading from b. |
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.