Function
Static Public Summary | ||
public |
ensureWARCFilename(filename: string, gzipping: boolean): string Ensure that the supplied name for the WARC is correct |
|
public |
getResBodyElectron(requestId: string, wcDebugger: Object): Promise<Buffer> Electron requires the use of the debugger to retrieve the requests response body |
|
public |
isEmptyPlainObject(object: Object): boolean Test to see if a |
|
public |
async * recordIterator(warcStream: ReadStream | Gunzip): AsyncIterator<WARCRecord> Creates async iterator that yields WARCRecords given a readable stream of a WARC file |
|
public |
stringifyHeaders(headers: Object): string Converts an HTTP headers object into its string representation |
|
public |
stringifyRequestHeaders(headers: Object, host: string): string Converts an HTTP request headers object into its string representation |
Static Public
public ensureWARCFilename(filename: string, gzipping: boolean): string source
import ensureWARCFilename from 'node-warc/lib/utils/ensureWARCFilename.js'
Ensure that the supplied name for the WARC is correct
public getResBodyElectron(requestId: string, wcDebugger: Object): Promise<Buffer> source
import getResBodyElectron from 'node-warc/lib/utils/getResBodyElectron.js'
Electron requires the use of the debugger to retrieve the requests response body
Throw:
rejects if the error parameter to the callback was set |
public isEmptyPlainObject(object: Object): boolean source
import isEmptyPlainObject from 'node-warc/lib/utils/isEmptyPlainObject.js'
Test to see if a plain object
is empty
Params:
Name | Type | Attribute | Description |
object | Object |
|
public async * recordIterator(warcStream: ReadStream | Gunzip): AsyncIterator<WARCRecord> source
import recordIterator from 'node-warc/lib/parsers/recordterator.js'
Creates async iterator that yields WARCRecords given a readable stream of a WARC file
Params:
Name | Type | Attribute | Description |
warcStream | ReadStream | Gunzip |
public stringifyHeaders(headers: Object): string source
import {stringifyHeaders} from 'node-warc/lib/utils/headerSerializers.js'
Converts an HTTP headers object into its string representation
Params:
Name | Type | Attribute | Description |
headers | Object | The HTTP header object to be stringified |
public stringifyRequestHeaders(headers: Object, host: string): string source
import {stringifyRequestHeaders} from 'node-warc/lib/utils/headerSerializers.js'
Converts an HTTP request headers object into its string representation